Permalink
Browse files

Rename break to halt

  • Loading branch information...
koenbok committed Nov 8, 2016
1 parent 5901216 commit 416640c0e9fb4972bc97b781c0907f6d79277da1
Showing with 10 additions and 10 deletions.
  1. +1 −1 extras/Studio.framer/app.coffee
  2. +2 −2 framer/Animation.coffee
  3. +1 −1 framer/Events.coffee
  4. +6 −6 test/tests/LayerAnimationTest.coffee
@@ -1,7 +1,7 @@
layer = new Layer
animation = new Animation layer, {y: 500},
onStart: -> print "start"
- onBreak: -> print "break"
+ onHalt: -> print "halt"
onEnd: -> print "end"
onStop: -> print "stop"
View
@@ -154,7 +154,7 @@ class exports.Animation extends BaseClass
# Add the callbacks
@on(Events.AnimationStart, @options.onStart) if _.isFunction(@options.onStart)
- @on(Events.AnimationBreak, @options.onBreak) if _.isFunction(@options.onBreak)
+ @on(Events.AnimationHalt, @options.onHalt) if _.isFunction(@options.onHalt)
@on(Events.AnimationStop, @options.onStop) if _.isFunction(@options.onStop)
@on(Events.AnimationEnd, @options.onEnd) if _.isFunction(@options.onEnd)
@@ -193,7 +193,7 @@ class exports.Animation extends BaseClass
@_delayTimer = null
@layer.context.removeAnimation(@)
- @emit(Events.AnimationBreak) if emit
+ @emit(Events.AnimationHalt) if emit
@emit(Events.AnimationStop) if emit
Framer.Loop.off("update", @_update)
View
@@ -36,7 +36,7 @@ Events.Click = Events.TouchEnd
# Animation events
Events.AnimationStart = "start"
-Events.AnimationBreak = "break"
+Events.AnimationHalt = "halt"
Events.AnimationStop = "stop"
Events.AnimationEnd = "end"
@@ -693,18 +693,18 @@ describe "LayerAnimation", ->
layer.animate
x: 100
options:
- time: 0.1
+ time: AnimationTime
onStart: ->
layer.x.should.eql 0
done()
- it "should call break", (done) ->
+ it "should call halt", (done) ->
layer = new Layer
layer.animate
x: 100
options:
- time: 0.1
- onBreak: ->
+ time: AnimationTime
+ onHalt: ->
done()
layer.animateStop()
@@ -713,7 +713,7 @@ describe "LayerAnimation", ->
layer.animate
x: 100
options:
- time: 0.1
+ time: AnimationTime
onStop: ->
layer.x.should.eql 100
done()
@@ -723,7 +723,7 @@ describe "LayerAnimation", ->
layer.animate
x: 100
options:
- time: 0.1
+ time: AnimationTime
onEnd: ->
layer.x.should.eql 100
done()

0 comments on commit 416640c

Please sign in to comment.