Browse Source

cleanup fingerblast and rebuid docs

pull/443/head
fat 11 years ago
parent
commit
529edc0988
  1. 2
      docs/assets/js/docs.min.js
  2. 31
      docs/assets/js/fingerblast.js

2
docs/assets/js/docs.min.js vendored

File diff suppressed because one or more lines are too long

31
docs/assets/js/fingerblast.js

@ -5,12 +5,17 @@
/* jshint bitwise: false */
/* global GLOBAL: true */
function FingerBlast(element) {
(function () {
'use strict';
function FingerBlast(element) {
this.element = typeof element === 'string' ? document.querySelector(element) : element;
if (this.element) {
this.listen();
}
}
FingerBlast.prototype = {
x: NaN,
@ -22,8 +27,6 @@ FingerBlast.prototype = {
mouseIsDown: false,
listen: function () {
'use strict';
var activate = this.activate.bind(this);
var deactivate = this.deactivate.bind(this);
@ -59,8 +62,6 @@ FingerBlast.prototype = {
},
activate: function () {
'use strict';
if (this.active) {
return;
}
@ -72,8 +73,6 @@ FingerBlast.prototype = {
},
deactivate: function (e) {
'use strict';
this.active = false;
if (this.mouseIsDown) {
this.touchEnd(e);
@ -85,8 +84,6 @@ FingerBlast.prototype = {
},
click: function (e) {
'use strict';
if (e.synthetic) {
return;
}
@ -95,8 +92,6 @@ FingerBlast.prototype = {
},
touchStart: function (e) {
'use strict';
if (e.synthetic || /input|textarea/.test(e.target.tagName.toLowerCase())) {
return;
}
@ -110,8 +105,6 @@ FingerBlast.prototype = {
},
touchMove: function (e) {
'use strict';
if (e.synthetic) {
return;
}
@ -127,8 +120,6 @@ FingerBlast.prototype = {
},
touchEnd: function (e) {
'use strict';
if (e.synthetic) {
return;
}
@ -151,8 +142,6 @@ FingerBlast.prototype = {
},
fireTouchEvents: function (eventName, originalEvent) {
'use strict';
var events = [];
var gestures = [];
@ -235,8 +224,6 @@ FingerBlast.prototype = {
},
createMouseEvent: function (eventName, originalEvent) {
'use strict';
var e = document.createEvent('MouseEvent');
e.initMouseEvent(eventName, true, true,
@ -255,8 +242,6 @@ FingerBlast.prototype = {
},
move: function (x, y) {
'use strict';
if (isNaN(x) || isNaN(y)) {
this.target = null;
} else {
@ -269,3 +254,7 @@ FingerBlast.prototype = {
}
}
};
window.FingerBlast = FingerBlast;
}());

Loading…
Cancel
Save