Permalink
Browse files

Add path as a derived animation property

  • Loading branch information...
nvh committed Feb 1, 2018
1 parent 08c3304 commit e249eb0723e133a2c292fafd98f5d7de2b69b39e
Showing with 4 additions and 1 deletion.
  1. +4 −1 framer/Animation.coffee
View
@@ -430,14 +430,17 @@ class exports.Animation extends BaseClass
# Only animate numeric properties for now
for k, v of properties
if k in ["frame", "size", "point", "midPoint"] # Derived properties
if k in ["frame", "size", "point", "midPoint", "path"] # Derived properties
switch k
when "frame" then derivedKeys = ["x", "y", "width", "height"]
when "size" then derivedKeys = ["width", "height"]
when "point" then derivedKeys = ["x", "y"]
when "midPoint" then derivedKeys = ["midX", "midY"]
when "path" then derivedKeys = ["x", "y", "rotation"]
else derivedKeys = []
if SVG.isPath(v)
if k is "path"
layer.midPoint = v.start
for derivedKey in derivedKeys
animatableProperties[derivedKey] = v
else if _.isObject(v)

0 comments on commit e249eb0

Please sign in to comment.