mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Fixed tests to account for #1459 fix (fire drag-end event even if pointer didn't move)
This commit is contained in:
parent
6b500f1ff2
commit
3769af532b
@ -2048,7 +2048,7 @@ function OpenSeadragon( options ){
|
||||
},
|
||||
|
||||
/**
|
||||
* COnvert passed addEventListener() options to boolean or options object,
|
||||
* Convert passed addEventListener() options to boolean or options object,
|
||||
* depending on browser support.
|
||||
* @function
|
||||
* @param {Boolean|Object} [options] Boolean useCapture, or if [supportsEventListenerOptions]{@link OpenSeadragon.supportsEventListenerOptions}, can be an object
|
||||
|
@ -12,6 +12,7 @@
|
||||
}
|
||||
|
||||
$.MouseTracker.havePointerEvents = false;
|
||||
$.MouseTracker.unprefixedPointerEvents = true;
|
||||
$.MouseTracker.subscribeEvents.push( "mouseenter", "mouseleave" );
|
||||
if ( $.Browser.vendor !== $.BROWSERS.IE || $.Browser.version > 8 ) {
|
||||
$.MouseTracker.subscribeEvents.push( "mouseover", "mouseout" );
|
||||
@ -20,6 +21,15 @@
|
||||
$.MouseTracker.havePointerOverOut = false;
|
||||
}
|
||||
$.MouseTracker.subscribeEvents.push( "mousedown", "mouseup", "mousemove" );
|
||||
$.MouseTracker.mousePointerId = "legacy-mouse";
|
||||
// Legacy mouse events capture support (IE/Firefox only?)
|
||||
$.MouseTracker.havePointerCapture = (function () {
|
||||
var divElement = document.createElement( 'div' );
|
||||
return $.isFunction( divElement.setCapture ) && $.isFunction( divElement.releaseCapture );
|
||||
}());
|
||||
if ( $.MouseTracker.havePointerCapture ) {
|
||||
$.MouseTracker.subscribeEvents.push( "losecapture" );
|
||||
}
|
||||
if ( 'ontouchstart' in window ) {
|
||||
// iOS, Android, and other W3c Touch Event implementations
|
||||
// (see http://www.w3.org/TR/touch-events/)
|
||||
@ -32,6 +42,5 @@
|
||||
// Subscribe to these to prevent default gesture handling
|
||||
$.MouseTracker.subscribeEvents.push( "gesturestart", "gesturechange" );
|
||||
}
|
||||
$.MouseTracker.mousePointerId = "legacy-mouse";
|
||||
|
||||
}(OpenSeadragon));
|
||||
|
@ -452,7 +452,7 @@
|
||||
clickCount: 2,
|
||||
dblClickCount: 1,
|
||||
dragCount: 0,
|
||||
dragEndCount: 0,
|
||||
dragEndCount: 2, // v2.5.0+ drag-end event now fired even if pointer didn't move (#1459)
|
||||
insideElementPressed: true,
|
||||
insideElementReleased: true,
|
||||
contacts: 0,
|
||||
@ -480,7 +480,7 @@
|
||||
clickCount: 1,
|
||||
dblClickCount: 0,
|
||||
dragCount: 0,
|
||||
dragEndCount: 0,
|
||||
dragEndCount: 1, // v2.5.0+ drag-end event now fired even if pointer didn't move (#1459)
|
||||
insideElementPressed: true,
|
||||
insideElementReleased: true,
|
||||
contacts: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user