clicking the image stops the slideshow
This commit is contained in:
parent
045260362d
commit
ac9b152a64
@ -444,7 +444,7 @@ Config =
|
|||||||
'Advance to next post when contracting an expanded image.'
|
'Advance to next post when contracting an expanded image.'
|
||||||
]
|
]
|
||||||
|
|
||||||
gallery :
|
gallery:
|
||||||
'Hide Thumbnails': [
|
'Hide Thumbnails': [
|
||||||
false
|
false
|
||||||
]
|
]
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Gallery =
|
|||||||
|
|
||||||
{cb} = Gallery
|
{cb} = Gallery
|
||||||
$.on nodes.frame, 'click', cb.blank
|
$.on nodes.frame, 'click', cb.blank
|
||||||
$.on nodes.next, 'click', cb.advance
|
$.on nodes.next, 'click', cb.click
|
||||||
$.on $('.gal-prev', dialog), 'click', cb.prev
|
$.on $('.gal-prev', dialog), 'click', cb.prev
|
||||||
$.on $('.gal-next', dialog), 'click', cb.next
|
$.on $('.gal-next', dialog), 'click', cb.next
|
||||||
$.on $('.gal-start', dialog), 'click', cb.start
|
$.on $('.gal-start', dialog), 'click', cb.start
|
||||||
@ -118,7 +118,7 @@ Gallery =
|
|||||||
when 'Right'
|
when 'Right'
|
||||||
Gallery.cb.next
|
Gallery.cb.next
|
||||||
when 'Enter'
|
when 'Enter'
|
||||||
Gallery.cb.advanceKey
|
Gallery.cb.advance
|
||||||
when 'Left', ''
|
when 'Left', ''
|
||||||
Gallery.cb.prev
|
Gallery.cb.prev
|
||||||
when 'p'
|
when 'p'
|
||||||
@ -200,15 +200,17 @@ Gallery =
|
|||||||
|
|
||||||
prev: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id - 1]
|
prev: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id - 1]
|
||||||
next: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id + 1]
|
next: -> Gallery.cb.open.call Gallery.images[+Gallery.nodes.current.dataset.id + 1]
|
||||||
|
advance: -> if Gallery.nodes.current.paused then return Gallery.nodes.current.play() else Gallery.cb.next()
|
||||||
toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)()
|
toggle: -> (if Gallery.nodes then Gallery.cb.close else Gallery.build)()
|
||||||
blank: (e) -> Gallery.cb.close() if e.target is @
|
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']()
|
toggleSlideshow: -> Gallery.cb[if Gallery.slideshow then 'stop' else 'start']()
|
||||||
|
|
||||||
advanceKey: ->
|
click: ->
|
||||||
if Gallery.nodes.current.paused then return Gallery.nodes.current.play()
|
if Gallery.slideshow
|
||||||
Gallery.cb.next()
|
Gallery.cb.stop()
|
||||||
|
else unless Gallery.nodes.current.controls
|
||||||
|
Gallery.cb.advance()
|
||||||
|
|
||||||
pause: ->
|
pause: ->
|
||||||
{current} = Gallery.nodes
|
{current} = Gallery.nodes
|
||||||
current[if current.paused then 'play' else 'pause']() if current.nodeName is 'VIDEO'
|
current[if current.paused then 'play' else 'pause']() if current.nodeName is 'VIDEO'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user