Skip to content

Commit 0c6f3f5

Browse files
committed
Fix flow.
1 parent 1cef3ee commit 0c6f3f5

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

newIDE/app/src/ObjectsRendering/Renderers/RenderedCustomObjectInstance.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const layoutFields = [
210210

211211
const getHorizontalAnchorValue = (
212212
anchorName: string,
213-
properties: ?gdNamedPropertyDescriptorsList
213+
properties: ?gdMapStringPropertyDescriptor
214214
): ?number => {
215215
const horizontalAnchorName = (anchorName.includes('-')
216216
? anchorName.split('-')[1]
@@ -230,7 +230,7 @@ const getHorizontalAnchorValue = (
230230

231231
const getVerticalAnchorValue = (
232232
anchorName: string,
233-
properties: ?gdNamedPropertyDescriptorsList
233+
properties: ?gdMapStringPropertyDescriptor
234234
): ?number => {
235235
const verticalAnchorName = (anchorName.includes('-')
236236
? anchorName.split('-')[0]
@@ -254,7 +254,7 @@ const getVerticalAnchorValue = (
254254
*/
255255
const getHorizontalOriginAnchorValue = (
256256
anchorName: string,
257-
properties: gdNamedPropertyDescriptorsList,
257+
properties: gdMapStringPropertyDescriptor,
258258
targetAnchorValue: ?number
259259
): ?number => {
260260
const horizontalAnchorName = (anchorName.includes('-')
@@ -274,7 +274,7 @@ const getHorizontalOriginAnchorValue = (
274274
*/
275275
const getVerticalOriginAnchorValue = (
276276
anchorName: string,
277-
properties: gdNamedPropertyDescriptorsList,
277+
properties: gdMapStringPropertyDescriptor,
278278
targetAnchorValue: ?number
279279
): ?number => {
280280
const verticalAnchorName = (anchorName.includes('-')
@@ -349,16 +349,20 @@ const getLayouts = (
349349
layoutField === 'AnchorOrigin'
350350
) {
351351
horizontalAnchorTarget =
352-
getHorizontalAnchorValue(anchorTargetStringValue, instanceProperties) ||
353-
anchorTargetValueNumber;
352+
getHorizontalAnchorValue(
353+
anchorTargetStringValue,
354+
instanceProperties
355+
) || anchorTargetValueNumber;
354356
}
355357
if (
356358
layoutField === 'VerticalAnchorOrigin' ||
357359
layoutField === 'AnchorOrigin'
358360
) {
359361
verticalAnchorTarget =
360-
getVerticalAnchorValue(anchorTargetStringValue, instanceProperties) ||
361-
anchorTargetValueNumber;
362+
getVerticalAnchorValue(
363+
anchorTargetStringValue,
364+
instanceProperties
365+
) || anchorTargetValueNumber;
362366
}
363367
}
364368
}
@@ -398,7 +402,7 @@ const getLayouts = (
398402
const anchorOrigin =
399403
getHorizontalOriginAnchorValue(
400404
propertyValueString,
401-
properties,
405+
instanceProperties,
402406
horizontalAnchorTarget
403407
) || propertyValueNumber;
404408
if (anchorOrigin !== null) {
@@ -416,7 +420,7 @@ const getLayouts = (
416420
const anchorOrigin =
417421
getVerticalOriginAnchorValue(
418422
propertyValueString,
419-
properties,
423+
instanceProperties,
420424
horizontalAnchorTarget
421425
) || propertyValueNumber;
422426
if (anchorOrigin !== null) {

0 commit comments

Comments
 (0)