From e57ec36117dd5b8b93d8b9d80e3072bc761a1055 Mon Sep 17 00:00:00 2001 From: Koen Bok Date: Thu, 4 Feb 2016 13:18:59 +0100 Subject: [PATCH] Screen edge swipes fixed https://github.com/motif/company/issues/964 --- framer/Layer.coffee | 22 ---------------------- framer/Screen.coffee | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/framer/Layer.coffee b/framer/Layer.coffee index 6fd5cb992..b88d6a9fd 100644 --- a/framer/Layer.coffee +++ b/framer/Layer.coffee @@ -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) diff --git a/framer/Screen.coffee b/framer/Screen.coffee index 49dba6fe4..43cd05ea3 100644 --- a/framer/Screen.coffee +++ b/framer/Screen.coffee @@ -47,6 +47,27 @@ class ScreenClass extends BaseClass return "" + # 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 \ No newline at end of file