Skip to content

Commit

Permalink
DRYer step()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotz committed May 18, 2013
1 parent e3493d9 commit f68c9e5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions oridomi.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,15 @@ class OriDomi
@_inTrans = true
[fn, angle, anchor, options] = @_queue.shift()
@unfreeze() if @isFrozen
if anchor isnt @lastOp.anchor
@_stageReset anchor, =>
@_setCallback {angle, anchor, options, fn}
fn.call @, angle, anchor, options
else
next = =>
@_setCallback {angle, anchor, options, fn}
fn.call @, angle, anchor, options

if anchor isnt @lastOp.anchor
@_stageReset anchor, next
else
next()


# This method tests if the called action is identical to the previous one.
# If two identical operations were called in a row, the transition callback
Expand Down

0 comments on commit f68c9e5

Please sign in to comment.