add keybinds for toggling slideshow and video pausing
This commit is contained in:
parent
a5494c8a2e
commit
815f58be8b
@ -1,7 +1,7 @@
|
||||
<div class="gal-viewport">
|
||||
<span class="gal-buttons">
|
||||
<a href="javascript:;" class="gal-start" title="Start slideshow"><i></i></a>
|
||||
<a href="javascript:;" class="gal-stop" title="Stop slideshow"><i></i></a>
|
||||
<a href="javascript:;" class="gal-start" title="Start slideshow (S to toggle)"><i></i></a>
|
||||
<a href="javascript:;" class="gal-stop" title="Stop slideshow (S to toggle)"><i></i></a>
|
||||
<a href="javascript:;" class="menu-button"><i></i></a>
|
||||
<a href="javascript:;" class="gal-close">×</a>
|
||||
</span>
|
||||
|
||||
@ -125,6 +125,10 @@ Gallery =
|
||||
Gallery.cb.advanceKey
|
||||
when 'Left', ''
|
||||
Gallery.cb.prev
|
||||
when 'p'
|
||||
Gallery.cb.pause
|
||||
when 's'
|
||||
Gallery.cb.toggleSlideshow
|
||||
|
||||
return unless cb
|
||||
e.stopPropagation()
|
||||
@ -203,6 +207,7 @@ Gallery =
|
||||
toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)()
|
||||
blank: (e) -> Gallery.cb.close() if e.target is @
|
||||
advance: -> Gallery.cb.advanceKey() unless Gallery.nodes.current.controls
|
||||
toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']()
|
||||
|
||||
advanceKey: ->
|
||||
if Gallery.nodes.current.paused then return Gallery.nodes.current.play()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user