/*!
* jQuery UI Mouse 1.14.2
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
//>>label: Mouse
//>>group: Widgets
//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
//>>docs: https://api.jqueryui.com/mouse/
( function( factory ) {
"use strict";
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [
"jquery",
"../version",
"../widget"
], factory );
} else {
// Browser globals
factory( jQuery );
}
} )( function( $ ) {
"use strict";
var mouseHandled = false;
$( document ).on( "mouseup", function() {
mouseHandled = false;
} );
return $.widget( "ui.mouse", {
version: "1.14.2",
options: {
cancel: "input, textarea, button, select, option",
distance: 1,
delay: 0
},
_mouseInit: function() {
var that = this;
this.element
.on( "mousedown." + this.widgetName, function( event ) {
return that._mouseDown( event );
} )
.on( "click." + this.widgetName, function( event ) {
if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
$.removeData( event.target, that.widgetName + ".preventClickEvent" );
event.stopImmediatePropagation();
return false;
}
} );
this.started = false;
},
// TODO: make sure destroying one instance of mouse doesn't mess with
// other instances of mouse
_mouseDestroy: function() {
this.element.off( "." + this.widgetName );
if ( this._mouseMoveDelegate ) {
this.document
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
}
},
_mouseDown: function( event ) {
// don't let more than one widget handle mouseStart
if ( mouseHandled ) {
return;
}
this._mouseMoved = false;
// We may have missed mouseup (out of window)
if ( this._mouseStarted ) {
this._mouseUp( event );
}
this._mouseDownEvent = event;
var that = this,
btnIsLeft = event.which === 1,
elIsCancel = typeof this.options.cancel === "string" ?
$( event.target ).closest( this.options.cancel ).length :
false;
if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
return true;
}
this.mouseDelayMet = !this.options.delay;
if ( !this.mouseDelayMet ) {
this._mouseDelayTimer = setTimeout( function() {
that.mouseDelayMet = true;
}, this.options.delay );
}
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
this._mouseStarted = ( this._mouseStart( event ) !== false );
if ( !this._mouseStarted ) {
event.preventDefault();
return true;
}
}
// Click event may never have fired (Gecko & Opera)
if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
$.removeData( event.target, this.widgetName + ".preventClickEvent" );
}
// These delegates are required to keep context
this._mouseMoveDelegate = function( event ) {
return that._mouseMove( event );
};
this._mouseUpDelegate = function( event ) {
return that._mouseUp( event );
};
this.document
.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
event.preventDefault();
mouseHandled = true;
return true;
},
_mouseMove: function( event ) {
// Only check for mouseups outside the document if you've moved inside the document
// at least once.
if ( this._mouseMoved && !event.which ) {
// Support: Safari <=8 - 9
// Safari sets which to 0 if you press any of the following keys
// during a drag (#14461)
if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
this.ignoreMissingWhich = true;
} else if ( !this.ignoreMissingWhich ) {
return this._mouseUp( event );
}
}
if ( event.which || event.button ) {
this._mouseMoved = true;
}
if ( this._mouseStarted ) {
this._mouseDrag( event );
return event.preventDefault();
}
if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
this._mouseStarted =
( this._mouseStart( this._mouseDownEvent, event ) !== false );
if ( this._mouseStarted ) {
this._mouseDrag( event );
} else {
this._mouseUp( event );
}
}
return !this._mouseStarted;
},
_mouseUp: function( event ) {
this.document
.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
if ( this._mouseStarted ) {
this._mouseStarted = false;
if ( event.target === this._mouseDownEvent.target ) {
$.data( event.target, this.widgetName + ".preventClickEvent", true );
}
this._mouseStop( event );
}
if ( this._mouseDelayTimer ) {
clearTimeout( this._mouseDelayTimer );
delete this._mouseDelayTimer;
}
this.ignoreMissingWhich = false;
mouseHandled = false;
event.preventDefault();
},
_mouseDistanceMet: function( event ) {
return ( Math.max(
Math.abs( this._mouseDownEvent.pageX - event.pageX ),
Math.abs( this._mouseDownEvent.pageY - event.pageY )
) >= this.options.distance
);
},
_mouseDelayMet: function( /* event */ ) {
return this.mouseDelayMet;
},
// These are placeholder methods, to be overriden by extending plugin
_mouseStart: function( /* event */ ) {},
_mouseDrag: function( /* event */ ) {},
_mouseStop: function( /* event */ ) {},
_mouseCapture: function( /* event */ ) {
return true;
}
} );
} );
| nama | waktu | ukuran | owner | perm | aksi |
|---|---|---|---|---|---|
| .. | |||||
| accordion.js | 2026-10-22 10:47 | 15.48 KB | 76129f60960:kunden | -xw-x--x-- | |
| accordion.min.js | 2026-10-22 10:47 | 8.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| autocomplete.js | 2026-10-22 10:47 | 15.8 KB | 76129f60960:kunden | -xw-x--x-- | |
| autocomplete.min.js | 2026-10-22 10:47 | 8.08 KB | 76129f60960:kunden | -xw-x--x-- | |
| button.js | 2026-10-22 10:47 | 11.4 KB | 76129f60960:kunden | -xw-x--x-- | |
| button.min.js | 2026-10-22 10:47 | 6.01 KB | 76129f60960:kunden | -xw-x--x-- | |
| checkboxradio.js | 2026-10-22 10:47 | 7.42 KB | 76129f60960:kunden | -xw-x--x-- | |
| checkboxradio.min.js | 2026-10-22 10:47 | 4.25 KB | 76129f60960:kunden | -xw-x--x-- | |
| controlgroup.js | 2026-10-22 10:47 | 8.42 KB | 76129f60960:kunden | -xw-x--x-- | |
| controlgroup.min.js | 2026-10-22 10:47 | 4.3 KB | 76129f60960:kunden | -xw-x--x-- | |
| core.js | 2026-10-22 10:47 | 45.26 KB | 76129f60960:kunden | -xw-x--x-- | |
| core.min.js | 2026-10-22 10:47 | 18.24 KB | 76129f60960:kunden | -xw-x--x-- | |
| datepicker.js | 2026-10-22 10:47 | 80.36 KB | 76129f60960:kunden | -xw-x--x-- | |
| datepicker.min.js | 2026-10-22 10:47 | 35.88 KB | 76129f60960:kunden | -xw-x--x-- | |
| dialog.js | 2026-10-22 10:47 | 22.79 KB | 76129f60960:kunden | -xw-x--x-- | |
| dialog.min.js | 2026-10-22 10:47 | 12.89 KB | 76129f60960:kunden | -xw-x--x-- | |
| draggable.js | 2026-10-22 10:47 | 34.66 KB | 76129f60960:kunden | -xw-x--x-- | |
| draggable.min.js | 2026-10-22 10:47 | 17.94 KB | 76129f60960:kunden | -xw-x--x-- | |
| droppable.js | 2026-10-22 10:47 | 12.6 KB | 76129f60960:kunden | -xw-x--x-- | |
| droppable.min.js | 2026-10-22 10:47 | 6.51 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-blind.js | 2026-10-22 10:47 | 1.61 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-blind.min.js | 2026-10-22 10:47 | 880 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-bounce.js | 2026-10-22 10:47 | 2.6 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-bounce.min.js | 2026-10-22 10:47 | 991 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-clip.js | 2026-10-22 10:47 | 1.54 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-clip.min.js | 2026-10-22 10:47 | 796 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-drop.js | 2026-10-22 10:47 | 1.56 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-drop.min.js | 2026-10-22 10:47 | 753 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-explode.js | 2026-10-22 10:47 | 2.8 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-explode.min.js | 2026-10-22 10:47 | 1.1 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-fade.js | 2026-10-22 10:47 | 968 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-fade.min.js | 2026-10-22 10:47 | 525 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-fold.js | 2026-10-22 10:47 | 2.13 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-fold.min.js | 2026-10-22 10:47 | 1020 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-highlight.js | 2026-10-22 10:47 | 1.21 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-highlight.min.js | 2026-10-22 10:47 | 648 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-puff.js | 2026-10-22 10:47 | 995 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-puff.min.js | 2026-10-22 10:47 | 510 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-pulsate.js | 2026-10-22 10:47 | 1.53 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-pulsate.min.js | 2026-10-22 10:47 | 688 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-scale.js | 2026-10-22 10:47 | 1.34 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-scale.min.js | 2026-10-22 10:47 | 723 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-shake.js | 2026-10-22 10:47 | 1.84 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-shake.min.js | 2026-10-22 10:47 | 846 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-size.js | 2026-10-22 10:47 | 5.29 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-size.min.js | 2026-10-22 10:47 | 2.43 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-slide.js | 2026-10-22 10:47 | 1.92 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect-slide.min.js | 2026-10-22 10:47 | 917 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-transfer.js | 2026-10-22 10:47 | 887 B | 76129f60960:kunden | -xw-x--x-- | |
| effect-transfer.min.js | 2026-10-22 10:47 | 442 B | 76129f60960:kunden | -xw-x--x-- | |
| effect.js | 2026-10-22 10:47 | 23.5 KB | 76129f60960:kunden | -xw-x--x-- | |
| effect.min.js | 2026-10-22 10:47 | 9.86 KB | 76129f60960:kunden | -xw-x--x-- | |
| menu.js | 2026-10-22 10:47 | 18.46 KB | 76129f60960:kunden | -xw-x--x-- | |
| menu.min.js | 2026-10-22 10:47 | 9.92 KB | 76129f60960:kunden | -xw-x--x-- | |
| mouse.js | 2026-10-22 10:47 | 5.49 KB | 76129f60960:kunden | -xw-x--x-- | |
| mouse.min.js | 2026-10-22 10:47 | 3.22 KB | 76129f60960:kunden | -xw-x--x-- | |
| progressbar.js | 2026-10-22 10:47 | 4.08 KB | 76129f60960:kunden | -xw-x--x-- | |
| progressbar.min.js | 2026-10-22 10:47 | 2.5 KB | 76129f60960:kunden | -xw-x--x-- | |
| resizable.js | 2026-10-22 10:47 | 31.31 KB | 76129f60960:kunden | -xw-x--x-- | |
| resizable.min.js | 2026-10-22 10:47 | 18.99 KB | 76129f60960:kunden | -xw-x--x-- | |
| selectable.js | 2026-10-22 10:47 | 7.94 KB | 76129f60960:kunden | -xw-x--x-- | |
| selectable.min.js | 2026-10-22 10:47 | 4.4 KB | 76129f60960:kunden | -xw-x--x-- | |
| selectmenu.js | 2026-10-22 10:47 | 15.25 KB | 76129f60960:kunden | -xw-x--x-- | |
| selectmenu.min.js | 2026-10-22 10:47 | 9.12 KB | 76129f60960:kunden | -xw-x--x-- | |
| slider.js | 2026-10-22 10:47 | 19.14 KB | 76129f60960:kunden | -xw-x--x-- | |
| slider.min.js | 2026-10-22 10:47 | 10.51 KB | 76129f60960:kunden | -xw-x--x-- | |
| sortable.js | 2026-10-22 10:47 | 46.26 KB | 76129f60960:kunden | -xw-x--x-- | |
| sortable.min.js | 2026-10-22 10:47 | 24.73 KB | 76129f60960:kunden | -xw-x--x-- | |
| spinner.js | 2026-10-22 10:47 | 14.03 KB | 76129f60960:kunden | -xw-x--x-- | |
| spinner.min.js | 2026-10-22 10:47 | 7.45 KB | 76129f60960:kunden | -xw-x--x-- | |
| tabs.js | 2026-10-22 10:47 | 22.95 KB | 76129f60960:kunden | -xw-x--x-- | |
| tabs.min.js | 2026-10-22 10:47 | 11.51 KB | 76129f60960:kunden | -xw-x--x-- | |
| tooltip.js | 2026-10-22 10:47 | 13.96 KB | 76129f60960:kunden | -xw-x--x-- | |
| tooltip.min.js | 2026-10-22 10:47 | 6.07 KB | 76129f60960:kunden | -xw-x--x-- | |