Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Disable again
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Bo Rønsholdt committed Nov 14, 2017
1 parent 35feec6 commit 45ab697
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 59 deletions.
32 changes: 2 additions & 30 deletions dist/verso.js

Large diffs are not rendered by default.

30 changes: 1 addition & 29 deletions lib/coffeescript/verso.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class Verso
@tap =
count: 0
delay: @doubleTapDelay
@contextmenu =
count: 0
delay: @doubleTapDelay

@scrollerEl = @el.querySelector '.verso__scroller'
@pageSpreadEls = @el.querySelectorAll '.verso__page-spread'
Expand Down Expand Up @@ -487,32 +484,7 @@ class Verso
onContextmenu: (e) ->
e.preventDefault()

clearTimeout @contextmenu.timeout

if @contextmenu.count is 1
@contextmenu.count = 0

if @getActivePageSpread().isZoomable() and @transform.scale > 1
position = @getPosition()

@zoomTo
x: e.clientX
y: e.clientY
scale: 1
duration: @zoomDuration
, =>
@trigger 'zoomedOut', position: position

return

@trigger 'doubleContextmenu', @getCoordinateInfo(e.clientX, e.clientY, @getActivePageSpread())
else
@contextmenu.count++
@contextmenu.timeout = setTimeout =>
@contextmenu.count = 0

@trigger 'contextmenu', @getCoordinateInfo(e.clientX, e.clientY, @getActivePageSpread())
, @contextmenu.delay
@trigger 'contextmenu', @getCoordinateInfo(e.clientX, e.clientY, @getActivePageSpread())

false

Expand Down

0 comments on commit 45ab697

Please sign in to comment.