Skip to content

Commit 53643d0

Browse files
author
Andrew Page
committed
Refactor GAP for better scalling
GAP responds better to different device pixel ratios. iOS :devicePixelRatio = 1 or 2 Android :devicePixelRatio 1.0 to 2.n
1 parent 928883d commit 53643d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/quo.gestures.swipe.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Quo.Gestures.add
1717
"swiping", "swipingHorizontal", "swipingVertical"]
1818

1919
handler : do (base = Quo.Gestures) ->
20-
GAP = (if window.devicePixelRatio >= 2 then 15 else 20)
20+
GAP = Math.round(20 / window.devicePixelRatio)
2121
_target = null
2222
_start = null
2323
_start_axis = null

0 commit comments

Comments
 (0)