cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c4783101a0
commit
53eecfc17f
@ -1021,21 +1021,18 @@ var Gallery = {
|
|||||||
if(holding_toggle){
|
if(holding_toggle){
|
||||||
holding_toggle = false
|
holding_toggle = false
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
hold_timeout
|
if(hold_timeout){
|
||||||
&& clearTimeout(hold_timeout)
|
clearTimeout(hold_timeout)
|
||||||
hold_timeout = undefined
|
hold_timeout = undefined
|
||||||
that.toggleToolbar() }}
|
that.toggleToolbar() } }}
|
||||||
var collapse_button = toolbar.querySelector('.collapse')
|
var collapse_button = toolbar.querySelector('.collapse')
|
||||||
collapse_button.addEventListener('touchstart', handleInteractionStart)
|
collapse_button.addEventListener('touchstart', handleInteractionStart)
|
||||||
collapse_button.addEventListener('mousedown', handleInteractionStart)
|
collapse_button.addEventListener('mousedown', handleInteractionStart)
|
||||||
// XXX should these be on document???
|
collapse_button.addEventListener('touchend', handleInteractionEnd)
|
||||||
// ...if yes we'll need to be carefull with .preventDefault(..)
|
collapse_button.addEventListener('mouseup', handleInteractionEnd)
|
||||||
document.addEventListener('touchend', handleInteractionEnd)
|
|
||||||
document.addEventListener('mouseup', handleInteractionEnd)
|
|
||||||
|
|
||||||
// toolbar: autohide...
|
// toolbar: autohide...
|
||||||
var hide_timeout
|
var hide_timeout
|
||||||
// XXX does not work correctly with touch...
|
|
||||||
var toolbarAutoHideTimerStart = function(evt){
|
var toolbarAutoHideTimerStart = function(evt){
|
||||||
if(that.toolbar_autohide == 0
|
if(that.toolbar_autohide == 0
|
||||||
|| toolbar.classList.contains('sticky')){
|
|| toolbar.classList.contains('sticky')){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user