Skip to content

Commit

Permalink
Screen edge swipes fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Bok committed Feb 4, 2016
1 parent 9876ddd commit e57ec36
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
22 changes: 0 additions & 22 deletions framer/Layer.coffee
Expand Up @@ -1072,28 +1072,6 @@ class exports.Layer extends BaseClass
onSwipeRightStart:(cb) -> @on(Events.SwipeRightStart, cb)
onSwipeRightEnd:(cb) -> @on(Events.SwipeRightEnd, cb)

# Edge Swipe

onEdgeSwipe:(cb) -> @on(Events.EdgeSwipe, cb)
onEdgeSwipeStart:(cb) -> @on(Events.EdgeSwipeStart, cb)
onEdgeSwipeEnd:(cb) -> @on(Events.EdgeSwipeEnd, cb)

onEdgeSwipeTop:(cb) -> @on(Events.EdgeSwipeTop, cb)
onEdgeSwipeTopStart:(cb) -> @on(Events.EdgeSwipeTopStart, cb)
onEdgeSwipeTopEnd:(cb) -> @on(Events.EdgeSwipeTopEnd, cb)

onEdgeSwipeRight:(cb) -> @on(Events.EdgeSwipeRight, cb)
onEdgeSwipeRightStart:(cb) -> @on(Events.EdgeSwipeRightStart, cb)
onEdgeSwipeRightEnd:(cb) -> @on(Events.EdgeSwipeRightEnd, cb)

onEdgeSwipeBottom:(cb) -> @on(Events.EdgeSwipeBottom, cb)
onEdgeSwipeBottomStart:(cb) -> @on(Events.EdgeSwipeBottomStart, cb)
onEdgeSwipeBottomEnd:(cb) -> @on(Events.EdgeSwipeBottomEnd, cb)

onEdgeSwipeLeft:(cb) -> @on(Events.EdgeSwipeLeft, cb)
onEdgeSwipeLeftStart:(cb) -> @on(Events.EdgeSwipeLeftStart, cb)
onEdgeSwipeLeftEnd:(cb) -> @on(Events.EdgeSwipeLeftEnd, cb)

# Pan
onPan:(cb) -> @on(Events.Pan, cb)
onPanStart:(cb) -> @on(Events.PanStart, cb)
Expand Down
21 changes: 21 additions & 0 deletions framer/Screen.coffee
Expand Up @@ -47,6 +47,27 @@ class ScreenClass extends BaseClass

return "<Screen #{round(@width)}x#{round(@height)}>"

# Edge Swipe

onEdgeSwipe:(cb) -> @on(Events.EdgeSwipe, cb)
onEdgeSwipeStart:(cb) -> @on(Events.EdgeSwipeStart, cb)
onEdgeSwipeEnd:(cb) -> @on(Events.EdgeSwipeEnd, cb)

onEdgeSwipeTop:(cb) -> @on(Events.EdgeSwipeTop, cb)
onEdgeSwipeTopStart:(cb) -> @on(Events.EdgeSwipeTopStart, cb)
onEdgeSwipeTopEnd:(cb) -> @on(Events.EdgeSwipeTopEnd, cb)

onEdgeSwipeRight:(cb) -> @on(Events.EdgeSwipeRight, cb)
onEdgeSwipeRightStart:(cb) -> @on(Events.EdgeSwipeRightStart, cb)
onEdgeSwipeRightEnd:(cb) -> @on(Events.EdgeSwipeRightEnd, cb)

onEdgeSwipeBottom:(cb) -> @on(Events.EdgeSwipeBottom, cb)
onEdgeSwipeBottomStart:(cb) -> @on(Events.EdgeSwipeBottomStart, cb)
onEdgeSwipeBottomEnd:(cb) -> @on(Events.EdgeSwipeBottomEnd, cb)

onEdgeSwipeLeft:(cb) -> @on(Events.EdgeSwipeLeft, cb)
onEdgeSwipeLeftStart:(cb) -> @on(Events.EdgeSwipeLeftStart, cb)
onEdgeSwipeLeftEnd:(cb) -> @on(Events.EdgeSwipeLeftEnd, cb)

# We use this as a singleton
exports.Screen = new ScreenClass

0 comments on commit e57ec36

Please sign in to comment.