Browse Source

Minor style changes.

pull/521/head
XhmikosR 11 years ago committed by XhmikosR
parent
commit
5803b2920b
  1. 2
      docs/assets/js/fingerblast.js
  2. 3
      js/popovers.js
  3. 10
      js/push.js
  4. 7
      js/segmented-controllers.js
  5. 4
      js/sliders.js
  6. 4
      js/toggles.js

2
docs/assets/js/fingerblast.js

@ -9,7 +9,7 @@
'use strict';
function FingerBlast(element) {
function FingerBlast (element) {
this.element = typeof element === 'string' ? document.querySelector(element) : element;
if (this.element) {

3
js/popovers.js

@ -52,8 +52,7 @@
try {
popover = document.querySelector(anchor.hash);
}
catch (error) {
} catch (error) {
popover = null;
}

10
js/push.js

@ -262,7 +262,7 @@
}
};
function cacheCurrentContent() {
function cacheCurrentContent () {
domCache[PUSH.id] = document.body.cloneNode(true);
}
@ -337,7 +337,7 @@
document.body.insertBefore(swap, document.querySelector('.content'));
}
} else {
enter = /in$/.test(transition);
enter = /in$/.test(transition);
if (transition === 'fade') {
container.classList.add('in');
@ -494,7 +494,11 @@
window.addEventListener('touchstart', function () { isScrolling = false; });
window.addEventListener('touchmove', function () { isScrolling = true; });
window.addEventListener('touchend', touchend);
window.addEventListener('click', function (e) { if (getTarget(e)) {e.preventDefault();} });
window.addEventListener('click', function (e) {
if (getTarget(e)) {
e.preventDefault();
}
});
window.addEventListener('popstate', popstate);
window.PUSH = PUSH;

7
js/segmented-controllers.js

@ -61,5 +61,10 @@
targetBody.classList.add(className);
});
window.addEventListener('click', function (e) { if (getTarget(e.target)) {e.preventDefault();} });
window.addEventListener('click', function (e) {
if (getTarget(e.target)) {
e.preventDefault();
}
});
}());

4
js/sliders.js

@ -123,9 +123,7 @@
// we're done moving
startedMoving = false;
setSlideNumber(
(+new Date()) - startTime < 1000 && Math.abs(deltaX) > 15 ? (deltaX < 0 ? -1 : 1) : 0
);
setSlideNumber((+new Date()) - startTime < 1000 && Math.abs(deltaX) > 15 ? (deltaX < 0 ? -1 : 1) : 0);
offsetX = slideNumber * sliderWidth;

4
js/toggles.js

@ -104,7 +104,9 @@
toggle.classList[slideOn ? 'add' : 'remove']('active');
e = new CustomEvent('toggle', {
detail: { isActive: slideOn },
detail: {
isActive: slideOn
},
bubbles: true,
cancelable: true
});

Loading…
Cancel
Save