Permalink
Browse files

Add transform origin, fix curve name

  • Loading branch information...
Koen Bok
Koen Bok committed Apr 26, 2013
1 parent 987d99d commit 949744f73dafa7db7132dc093e46776cce3bec8b
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/animation.coffee
View
@@ -54,6 +54,7 @@ class Animation extends EventEmitter
# Set all the defaults
@time ?= 1000
@curve ?= "linear"
@origin ?= "50% 50%"
@count = 0
@precision ?= config.animationPrecision
@@ -153,6 +154,7 @@ class Animation extends EventEmitter
-webkit-animation-name: #{@animationName};
-webkit-animation-timing-function: linear;
-webkit-animation-fill-mode: both;
-webkit-tranform-origin: #{@origin};
}"
@view.addClass @animationName
@@ -328,8 +330,8 @@ class Animation extends EventEmitter
return bezier.defaults.EaseOut @precision, time
else if curve in ["ease-in-out"]
return bezier.defaults.EaseInOut @precision, time
else if curve[.."cubic-bezier".length-1] is "cubic-bezier"
v = parseCurve curve, "cubic-bezier"
else if curve[.."bezier-curve".length-1] is "bezier-curve"
v = parseCurve curve, "bezier-curve"
return bezier.BezierCurve v[0], v[1], v[2], v[3], precision, time
else if curve[.."spring".length-1] is "spring"
v = parseCurve curve, "spring"

0 comments on commit 949744f

Please sign in to comment.