Unit test fix for mouseover/mouseout fallback

This commit is contained in:
Mark Salsbery 2014-04-15 14:16:10 -07:00
parent 9b15ca090b
commit b897959cff
3 changed files with 5 additions and 5 deletions

View File

@ -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) {

View File

@ -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);
};

View File

@ -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 () {