Skip to content

Commit

Permalink
Fix midPoint setter when passed a function
Browse files Browse the repository at this point in the history
  • Loading branch information
nvh committed Feb 1, 2018
1 parent 35dd174 commit 9f07664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framer/Layer.coffee
Expand Up @@ -533,6 +533,7 @@ class exports.Layer extends BaseClass
x: @midX x: @midX
y: @midY y: @midY
set: (input) -> set: (input) ->
input = layerPropertyPointTransformer(input, @, "midPoint")
if not _.isNumber input if not _.isNumber input
input = _.pick(input, ["x", "y", "midX", "midY"]) input = _.pick(input, ["x", "y", "midX", "midY"])
if input.x? and not input.midX? if input.x? and not input.midX?
Expand All @@ -541,7 +542,6 @@ class exports.Layer extends BaseClass
if input.y? and not input.midY? if input.y? and not input.midY?
input.midY = input.y input.midY = input.y
delete input.y delete input.y
input = layerPropertyPointTransformer(input, @, "midPoint")
@_setGeometryValues(input, ["midX", "midY"]) @_setGeometryValues(input, ["midX", "midY"])


@define "size", @define "size",
Expand Down

0 comments on commit 9f07664

Please sign in to comment.