Mouse: Remove core event/alias and deprecated module dependencies

This commit is contained in:
Alexander Schmitz 2015-05-13 22:11:56 -04:00
parent 456c463a91
commit 7c419a7ba1

View File

@ -28,7 +28,7 @@
}(function( $ ) {
var mouseHandled = false;
$( document ).mouseup( function() {
$( document ).on( "mouseup", function() {
mouseHandled = false;
});
@ -43,10 +43,10 @@ return $.widget("ui.mouse", {
var that = this;
this.element
.bind("mousedown." + this.widgetName, function(event) {
.on("mousedown." + this.widgetName, function(event) {
return that._mouseDown(event);
})
.bind("click." + this.widgetName, function(event) {
.on("click." + this.widgetName, function(event) {
if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
$.removeData(event.target, that.widgetName + ".preventClickEvent");
event.stopImmediatePropagation();
@ -60,11 +60,11 @@ return $.widget("ui.mouse", {
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind("." + this.widgetName);
this.element.off("." + this.widgetName);
if ( this._mouseMoveDelegate ) {
this.document
.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
.unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
.off("mousemove." + this.widgetName, this._mouseMoveDelegate)
.off("mouseup." + this.widgetName, this._mouseUpDelegate);
}
},
@ -119,8 +119,8 @@ return $.widget("ui.mouse", {
};
this.document
.bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
event.preventDefault();
@ -164,8 +164,8 @@ return $.widget("ui.mouse", {
_mouseUp: function(event) {
this.document
.unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
if (this._mouseStarted) {
this._mouseStarted = false;