mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Unit test fix for mouseover/mouseout fallback
This commit is contained in:
parent
9b15ca090b
commit
b897959cff
@ -147,13 +147,13 @@
|
||||
var simulateEnter = function ($element, x, y) {
|
||||
simEvent.clientX = offset.left + x;
|
||||
simEvent.clientY = offset.top + y;
|
||||
$canvas.simulate( 'mouseenter', simEvent );
|
||||
$canvas.simulate( OpenSeadragon.MouseTracker.haveMouseEnter ? 'mouseenter' : 'mouseover', simEvent );
|
||||
};
|
||||
|
||||
var simulateLeave = function ($element, x, y) {
|
||||
simEvent.clientX = offset.left + x;
|
||||
simEvent.clientY = offset.top + y;
|
||||
$canvas.simulate( 'mouseleave', simEvent );
|
||||
$canvas.simulate( OpenSeadragon.MouseTracker.haveMouseEnter ? 'mouseleave' : 'mouseout', simEvent );
|
||||
};
|
||||
|
||||
var simulateMove = function ($element, dX, dY, count) {
|
||||
|
@ -189,7 +189,7 @@ QUnit.config.autostart = false;
|
||||
clientY:offset.top + locationY
|
||||
};
|
||||
$canvas
|
||||
.simulate('mouseenter', event)
|
||||
.simulate(OpenSeadragon.MouseTracker.haveMouseEnter ? 'mouseenter' : 'mouseover', event)
|
||||
.simulate('mousedown', event)
|
||||
.simulate('mouseup', event);
|
||||
};
|
||||
|
@ -37,7 +37,7 @@
|
||||
};
|
||||
|
||||
$canvas
|
||||
.simulate( 'mouseenter', event )
|
||||
.simulate( OpenSeadragon.MouseTracker.haveMouseEnter ? 'mouseenter' : 'mouseover', event )
|
||||
.simulate( 'mousedown', event );
|
||||
for ( var i = 0; i < args.dragCount; i++ ) {
|
||||
event.clientX += args.dragDx;
|
||||
@ -47,7 +47,7 @@
|
||||
}
|
||||
$canvas
|
||||
.simulate( 'mouseup', event )
|
||||
.simulate( 'mouseleave', event );
|
||||
.simulate( OpenSeadragon.MouseTracker.haveMouseEnter ? 'mouseleave' : 'mouseout', event );
|
||||
},
|
||||
|
||||
initializeTestDOM: function () {
|
||||
|
Loading…
Reference in New Issue
Block a user