MouseTracker Original Events in Handlers

Renamed insideElementRelease to insideElementReleased.
This commit is contained in:
Mark Salsbery 2013-09-10 17:31:51 -07:00
parent 1dc2d7e011
commit af078f8f19
5 changed files with 10 additions and 10 deletions

View File

@ -207,7 +207,7 @@ $.Button = function( options ) {
}, },
releaseHandler: function( tracker, eventData ) { releaseHandler: function( tracker, eventData ) {
if ( eventData.insideElementPressed && eventData.insideElementRelease ) { if ( eventData.insideElementPressed && eventData.insideElementReleased ) {
outTo( _this, $.ButtonState.HOVER ); outTo( _this, $.ButtonState.HOVER );
_this.raiseEvent( "onRelease", _this ); _this.raiseEvent( "onRelease", _this );
} else if ( eventData.insideElementPressed ) { } else if ( eventData.insideElementPressed ) {

View File

@ -101,7 +101,7 @@ $.ButtonGroup = function( options ) {
}, },
releaseHandler: function ( tracker, eventData ) { releaseHandler: function ( tracker, eventData ) {
var i; var i;
if ( !eventData.insideElementRelease ) { if ( !eventData.insideElementReleased ) {
for ( i = 0; i < _this.buttons.length; i++ ) { for ( i = 0; i < _this.buttons.length; i++ ) {
_this.buttons[ i ].notifyGroupExit(); _this.buttons[ i ].notifyGroupExit();
} }

View File

@ -280,7 +280,7 @@
* { * {
* position: The position of the event relative to the tracked element. * position: The position of the event relative to the tracked element.
* insideElementPressed: True if the left mouse button is currently being pressed and was initiated inside the tracked element, otherwise false. * insideElementPressed: True if the left mouse button is currently being pressed and was initiated inside the tracked element, otherwise false.
* insideElementRelease: Was the mouse still inside the tracked element when the button was released. * insideElementReleased: Was the mouse still inside the tracked element when the button was released.
* isTouchEvent: True if the original event is a touch event, otherwise false. * isTouchEvent: True if the original event is a touch event, otherwise false.
* originalEvent: The original event object. * originalEvent: The original event object.
* userData: Arbitrary user-defined object. * userData: Arbitrary user-defined object.
@ -881,7 +881,7 @@
//were we inside the tracked element when we were pressed //were we inside the tracked element when we were pressed
insideElementPressed = delegate.insideElementPressed, insideElementPressed = delegate.insideElementPressed,
//are we still inside the tracked element when we released //are we still inside the tracked element when we released
insideElementRelease = delegate.insideElement, insideElementReleased = delegate.insideElement,
propagate; propagate;
isTouch = isTouch || false; isTouch = isTouch || false;
@ -902,7 +902,7 @@
{ {
position: getMouseRelative( event, tracker.element ), position: getMouseRelative( event, tracker.element ),
insideElementPressed: insideElementPressed, insideElementPressed: insideElementPressed,
insideElementRelease: insideElementRelease, insideElementReleased: insideElementReleased,
isTouchEvent: isTouch, isTouchEvent: isTouch,
originalEvent: originalEvent, originalEvent: originalEvent,
userData: tracker.userData userData: tracker.userData
@ -913,7 +913,7 @@
} }
} }
if ( insideElementPressed && insideElementRelease ) { if ( insideElementPressed && insideElementReleased ) {
handleMouseClick( tracker, originalEvent, isTouch ); handleMouseClick( tracker, originalEvent, isTouch );
} }
} }

View File

@ -198,7 +198,7 @@ $.ReferenceStrip = function ( options ) {
now = $.now(); now = $.now();
if ( eventData.insideElementPressed && if ( eventData.insideElementPressed &&
eventData.insideElementRelease && eventData.insideElementReleased &&
tracker.dragging && tracker.dragging &&
( now - tracker.dragging ) < tracker.clickTimeThreshold ) { ( now - tracker.dragging ) < tracker.clickTimeThreshold ) {
tracker.dragging = null; tracker.dragging = null;

View File

@ -1479,7 +1479,7 @@ function onCanvasRelease( tracker, eventData ) {
tracker: tracker, tracker: tracker,
position: eventData.position, position: eventData.position,
insideElementPressed: eventData.insideElementPressed, insideElementPressed: eventData.insideElementPressed,
insideElementRelease: eventData.insideElementRelease insideElementReleased: eventData.insideElementReleased
}); });
} }
@ -1519,7 +1519,7 @@ function onContainerExit( tracker, eventData ) {
} }
function onContainerRelease( tracker, eventData ) { function onContainerRelease( tracker, eventData ) {
if ( !eventData.insideElementRelease ) { if ( !eventData.insideElementReleased ) {
THIS[ this.hash ].mouseInside = false; THIS[ this.hash ].mouseInside = false;
if ( !THIS[ this.hash ].animating ) { if ( !THIS[ this.hash ].animating ) {
beginControlsAutoHide( this ); beginControlsAutoHide( this );
@ -1529,7 +1529,7 @@ function onContainerRelease( tracker, eventData ) {
tracker: tracker, tracker: tracker,
position: eventData.position, position: eventData.position,
insideElementPressed: eventData.insideElementPressed, insideElementPressed: eventData.insideElementPressed,
insideElementRelease: eventData.insideElementRelease insideElementReleased: eventData.insideElementReleased
}); });
} }