From af078f8f1921179903c02aa1703467a7e8127fa6 Mon Sep 17 00:00:00 2001 From: Mark Salsbery Date: Tue, 10 Sep 2013 17:31:51 -0700 Subject: [PATCH] MouseTracker Original Events in Handlers Renamed insideElementRelease to insideElementReleased. --- src/button.js | 2 +- src/buttongroup.js | 2 +- src/mousetracker.js | 8 ++++---- src/referencestrip.js | 2 +- src/viewer.js | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/button.js b/src/button.js index 22db888b..f6aca329 100644 --- a/src/button.js +++ b/src/button.js @@ -207,7 +207,7 @@ $.Button = function( options ) { }, releaseHandler: function( tracker, eventData ) { - if ( eventData.insideElementPressed && eventData.insideElementRelease ) { + if ( eventData.insideElementPressed && eventData.insideElementReleased ) { outTo( _this, $.ButtonState.HOVER ); _this.raiseEvent( "onRelease", _this ); } else if ( eventData.insideElementPressed ) { diff --git a/src/buttongroup.js b/src/buttongroup.js index db133352..5adaf09e 100644 --- a/src/buttongroup.js +++ b/src/buttongroup.js @@ -101,7 +101,7 @@ $.ButtonGroup = function( options ) { }, releaseHandler: function ( tracker, eventData ) { var i; - if ( !eventData.insideElementRelease ) { + if ( !eventData.insideElementReleased ) { for ( i = 0; i < _this.buttons.length; i++ ) { _this.buttons[ i ].notifyGroupExit(); } diff --git a/src/mousetracker.js b/src/mousetracker.js index ace89018..6d46b002 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -280,7 +280,7 @@ * { * 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. - * 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. * originalEvent: The original event object. * userData: Arbitrary user-defined object. @@ -881,7 +881,7 @@ //were we inside the tracked element when we were pressed insideElementPressed = delegate.insideElementPressed, //are we still inside the tracked element when we released - insideElementRelease = delegate.insideElement, + insideElementReleased = delegate.insideElement, propagate; isTouch = isTouch || false; @@ -902,7 +902,7 @@ { position: getMouseRelative( event, tracker.element ), insideElementPressed: insideElementPressed, - insideElementRelease: insideElementRelease, + insideElementReleased: insideElementReleased, isTouchEvent: isTouch, originalEvent: originalEvent, userData: tracker.userData @@ -913,7 +913,7 @@ } } - if ( insideElementPressed && insideElementRelease ) { + if ( insideElementPressed && insideElementReleased ) { handleMouseClick( tracker, originalEvent, isTouch ); } } diff --git a/src/referencestrip.js b/src/referencestrip.js index 94662764..47e7cf46 100644 --- a/src/referencestrip.js +++ b/src/referencestrip.js @@ -198,7 +198,7 @@ $.ReferenceStrip = function ( options ) { now = $.now(); if ( eventData.insideElementPressed && - eventData.insideElementRelease && + eventData.insideElementReleased && tracker.dragging && ( now - tracker.dragging ) < tracker.clickTimeThreshold ) { tracker.dragging = null; diff --git a/src/viewer.js b/src/viewer.js index c7995d9b..524e82f3 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1479,7 +1479,7 @@ function onCanvasRelease( tracker, eventData ) { tracker: tracker, position: eventData.position, insideElementPressed: eventData.insideElementPressed, - insideElementRelease: eventData.insideElementRelease + insideElementReleased: eventData.insideElementReleased }); } @@ -1519,7 +1519,7 @@ function onContainerExit( tracker, eventData ) { } function onContainerRelease( tracker, eventData ) { - if ( !eventData.insideElementRelease ) { + if ( !eventData.insideElementReleased ) { THIS[ this.hash ].mouseInside = false; if ( !THIS[ this.hash ].animating ) { beginControlsAutoHide( this ); @@ -1529,7 +1529,7 @@ function onContainerRelease( tracker, eventData ) { tracker: tracker, position: eventData.position, insideElementPressed: eventData.insideElementPressed, - insideElementRelease: eventData.insideElementRelease + insideElementReleased: eventData.insideElementReleased }); }