spatial-navigation
Version:
A javascript-based implementation of Spatial Navigation.
37 lines (29 loc) • 1.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Mouse = function () {
function Mouse() {
_classCallCheck(this, Mouse);
this.bindListeners();
}
_createClass(Mouse, [{
key: 'preventDefault',
value: function preventDefault(event) {
event.preventDefault();
}
}, {
key: 'bindListeners',
value: function bindListeners() {
document.addEventListener('mousedown', this.preventDefault);
document.addEventListener('mouseup', this.preventDefault);
document.addEventListener('click', this.preventDefault);
document.addEventListener('dblclick', this.preventDefault);
}
}]);
return Mouse;
}();
exports.default = new Mouse();
module.exports = exports['default'];