fix lib functions
This commit is contained in:
parent
634e9ac890
commit
7bb4950a1c
2 changed files with 6 additions and 6 deletions
|
|
@ -148,14 +148,14 @@ else {
|
||||||
eventHandler && eventHandler(e);
|
eventHandler && eventHandler(e);
|
||||||
releaseCaptureHandler && releaseCaptureHandler();
|
releaseCaptureHandler && releaseCaptureHandler();
|
||||||
|
|
||||||
exports.removeEventListener("mousemove", onMouseMove, true);
|
el.removeEventListener("mousemove", onMouseMove, true);
|
||||||
exports.removeEventListener("mouseup", onMouseUp, true);
|
el.removeEventListener("mouseup", onMouseUp, true);
|
||||||
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.addEventListener("mousemove", onMouseMove, true);
|
el.addEventListener("mousemove", onMouseMove, true);
|
||||||
exports.addEventListener("mouseup", onMouseUp, true);
|
el.addEventListener("mouseup", onMouseUp, true);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ if (!Object.keys) {
|
||||||
if (!Function.prototype.bind) {
|
if (!Function.prototype.bind) {
|
||||||
// from MDC
|
// from MDC
|
||||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
|
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind
|
||||||
Function.prototype.bind = function () {
|
Function.prototype.bind = function (obj) {
|
||||||
var slice = [].slice;
|
var slice = [].slice;
|
||||||
var args = slice.call(arguments, 1);
|
var args = slice.call(arguments, 1);
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
@ -114,7 +114,7 @@ if (!Function.prototype.bind) {
|
||||||
// optimize common case
|
// optimize common case
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
var bound = function() {
|
var bound = function() {
|
||||||
return fcn.apply(this instanceof nop ? this : obj, arguments);
|
return self.apply(this instanceof nop ? this : obj, arguments);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue