Permalink
Browse files

Merge pull request #239 from jchavarri/fix-issue-86

Fix issue #86: "Layer registration point vs originX/Y?"
  • Loading branch information...
koenbok committed Aug 14, 2015
2 parents 6360b78 + caebe0c commit c966d49c8fd8f9fe8564e61ccd60cb8e7cd43628
Showing with 14 additions and 2 deletions.
  1. +0 −1 framer/LayerStates.coffee
  2. +14 −1 test/tests/LayerStatesTest.coffee
@@ -138,7 +138,6 @@ class exports.LayerStates extends BaseClass
keys = []
for stateName, state of @_states
continue if stateName is "default"
keys = _.union(keys, _.keys(state))
keys
@@ -121,4 +121,17 @@ describe "LayerStates", ->
layer.states.switch "stateA", {curve:"linear", time:0.1}
it "should restore the default state when using non exportable properties", ->
layer = new Layer
layer.states.add
stateA: {midX:200}
layer.x.should.equal 0
layer.states.switchInstant "stateA"
layer.x.should.equal 200 - (layer.width // 2)
layer.states.switchInstant "default"
layer.x.should.equal 0

0 comments on commit c966d49

Please sign in to comment.