mirror of
https://github.com/zadam/trilium.git
synced 2025-01-14 02:58:39 +08:00
remove obsolete fabric/hammer/jquery from canvas-note early trials
This commit is contained in:
parent
f53a93e828
commit
73671671d7
3 changed files with 0 additions and 32319 deletions
File diff suppressed because it is too large
Load diff
7
libraries/canvas-note/hammer.2.0.8.min.js
vendored
7
libraries/canvas-note/hammer.2.0.8.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,33 +0,0 @@
|
|||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'hammerjs'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
factory(require('jquery'), require('hammerjs'));
|
||||
} else {
|
||||
factory(jQuery, Hammer);
|
||||
}
|
||||
}(function($, Hammer) {
|
||||
function hammerify(el, options) {
|
||||
var $el = $(el);
|
||||
if(!$el.data("hammer")) {
|
||||
$el.data("hammer", new Hammer($el[0], options));
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.hammer = function(options) {
|
||||
return this.each(function() {
|
||||
hammerify(this, options);
|
||||
});
|
||||
};
|
||||
|
||||
// extend the emit method to also trigger jQuery events
|
||||
Hammer.Manager.prototype.emit = (function(originalEmit) {
|
||||
return function(type, data) {
|
||||
originalEmit.call(this, type, data);
|
||||
$(this.element).trigger({
|
||||
type: type,
|
||||
gesture: data
|
||||
});
|
||||
};
|
||||
})(Hammer.Manager.prototype.emit);
|
||||
}));
|
Loading…
Reference in a new issue