Permalink
Browse files

Fix midPoint setter when passed a function

  • Loading branch information...
nvh committed Feb 1, 2018
1 parent 35dd174 commit 9f07664bee2a39446832645a8a4cec3a543dd34b
Showing with 1 addition and 1 deletion.
  1. +1 −1 framer/Layer.coffee
View
@@ -533,6 +533,7 @@ class exports.Layer extends BaseClass
x: @midX
y: @midY
set: (input) ->
input = layerPropertyPointTransformer(input, @, "midPoint")
if not _.isNumber input
input = _.pick(input, ["x", "y", "midX", "midY"])
if input.x? and not input.midX?
@@ -541,7 +542,6 @@ class exports.Layer extends BaseClass
if input.y? and not input.midY?
input.midY = input.y
delete input.y
input = layerPropertyPointTransformer(input, @, "midPoint")
@_setGeometryValues(input, ["midX", "midY"])
@define "size",

0 comments on commit 9f07664

Please sign in to comment.