www: update baguetteBox to v1.11.1
@@ -12,10 +12,6 @@ | ||
12 | 12 | box-sizing: border-box; |
13 | 13 | } |
14 | 14 | |
15 | -html { | |
16 | - height: 100%; | |
17 | -} | |
18 | - | |
19 | 15 | body { |
20 | 16 | background-color: #27343c; |
21 | 17 | color: black; |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /*! |
2 | 2 | * baguetteBox.js |
3 | 3 | * @author feimosi |
4 | - * @version 1.11.0 | |
4 | + * @version 1.11.1 | |
5 | 5 | * @url https://github.com/feimosi/baguetteBox.js |
6 | 6 | */ |
7 | 7 | #baguetteBox-overlay { |
@@ -7,12 +7,13 @@ | ||
7 | 7 | var selector = '.content'; |
8 | 8 | var el = document.querySelectorAll(selector); |
9 | 9 | |
10 | - if (el.length) { | |
11 | - baguetteBox.run(selector, { | |
12 | - async: false, | |
13 | - buttons: true, | |
14 | - noScrollbars: true | |
15 | - }); | |
10 | + if (el.length === 0) { | |
11 | + return; | |
16 | 12 | } |
17 | 13 | |
14 | + baguetteBox.run(selector, { | |
15 | + async: false, | |
16 | + buttons: true, | |
17 | + noScrollbars: true | |
18 | + }); | |
18 | 19 | })(); |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /*! |
2 | 2 | * baguetteBox.js |
3 | 3 | * @author feimosi |
4 | - * @version 1.11.0 | |
4 | + * @version 1.11.1 | |
5 | 5 | * @url https://github.com/feimosi/baguetteBox.js |
6 | 6 | */ |
7 | 7 |
@@ -317,27 +317,31 @@ | ||
317 | 317 | } |
318 | 318 | |
319 | 319 | function bindEvents() { |
320 | - var options = supports.passiveEvents ? { passive: true } : null; | |
320 | + var passiveEvent = supports.passiveEvents ? { passive: false } : null; | |
321 | + var nonPassiveEvent = supports.passiveEvents ? { passive: true } : null; | |
322 | + | |
321 | 323 | bind(overlay, 'click', overlayClickHandler); |
322 | 324 | bind(previousButton, 'click', previousButtonClickHandler); |
323 | 325 | bind(nextButton, 'click', nextButtonClickHandler); |
324 | 326 | bind(closeButton, 'click', closeButtonClickHandler); |
325 | 327 | bind(slider, 'contextmenu', contextmenuHandler); |
326 | - bind(overlay, 'touchstart', touchstartHandler, options); | |
327 | - bind(overlay, 'touchmove', touchmoveHandler, options); | |
328 | + bind(overlay, 'touchstart', touchstartHandler, nonPassiveEvent); | |
329 | + bind(overlay, 'touchmove', touchmoveHandler, passiveEvent); | |
328 | 330 | bind(overlay, 'touchend', touchendHandler); |
329 | 331 | bind(document, 'focus', trapFocusInsideOverlay, true); |
330 | 332 | } |
331 | 333 | |
332 | 334 | function unbindEvents() { |
333 | - var options = supports.passiveEvents ? { passive: true } : null; | |
335 | + var passiveEvent = supports.passiveEvents ? { passive: false } : null; | |
336 | + var nonPassiveEvent = supports.passiveEvents ? { passive: true } : null; | |
337 | + | |
334 | 338 | unbind(overlay, 'click', overlayClickHandler); |
335 | 339 | unbind(previousButton, 'click', previousButtonClickHandler); |
336 | 340 | unbind(nextButton, 'click', nextButtonClickHandler); |
337 | 341 | unbind(closeButton, 'click', closeButtonClickHandler); |
338 | 342 | unbind(slider, 'contextmenu', contextmenuHandler); |
339 | - unbind(overlay, 'touchstart', touchstartHandler, options); | |
340 | - unbind(overlay, 'touchmove', touchmoveHandler, options); | |
343 | + unbind(overlay, 'touchstart', touchstartHandler, nonPassiveEvent); | |
344 | + unbind(overlay, 'touchmove', touchmoveHandler, passiveEvent); | |
341 | 345 | unbind(overlay, 'touchend', touchendHandler); |
342 | 346 | unbind(document, 'focus', trapFocusInsideOverlay, true); |
343 | 347 | } |