mouseout callbacks should check if the mouse leaves map.eventsDiv instead of map.div or map.viewPortDiv, p=jorix, r=me (closes #3239)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -238,7 +238,7 @@ OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
*/
|
*/
|
||||||
defaultMouseOut: function (evt) {
|
defaultMouseOut: function (evt) {
|
||||||
if (this.mouseDragStart != null &&
|
if (this.mouseDragStart != null &&
|
||||||
OpenLayers.Util.mouseLeft(evt, this.map.div)) {
|
OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
|
||||||
if (this.zoomBox) {
|
if (this.zoomBox) {
|
||||||
this.removeZoomBox();
|
this.removeZoomBox();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
|
|||||||
*/
|
*/
|
||||||
defaultMouseOut: function (evt) {
|
defaultMouseOut: function (evt) {
|
||||||
if (this.mouseDragStart != null
|
if (this.mouseDragStart != null
|
||||||
&& OpenLayers.Util.mouseLeft(evt, this.map.div)) {
|
&& OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
|
||||||
if (this.zoomBox) {
|
if (this.zoomBox) {
|
||||||
this.removeZoomBox();
|
this.removeZoomBox();
|
||||||
if (this.startViaKeyboard) {
|
if (this.startViaKeyboard) {
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* {Boolean} Let the event propagate.
|
* {Boolean} Let the event propagate.
|
||||||
*/
|
*/
|
||||||
mouseout: function (evt) {
|
mouseout: function (evt) {
|
||||||
if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
|
if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
|
||||||
if(this.documentDrag === true) {
|
if(this.documentDrag === true) {
|
||||||
this.addDocumentEvents();
|
this.addDocumentEvents();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ OpenLayers.Handler.Hover = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* {Boolean} Continue propagating this event.
|
* {Boolean} Continue propagating this event.
|
||||||
*/
|
*/
|
||||||
mouseout: function(evt) {
|
mouseout: function(evt) {
|
||||||
if (OpenLayers.Util.mouseLeft(evt, this.map.div)) {
|
if (OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.callback('move', [evt]);
|
this.callback('move', [evt]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -563,7 +563,7 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* evt - {Event} The browser event
|
* evt - {Event} The browser event
|
||||||
*/
|
*/
|
||||||
mouseout: function(evt) {
|
mouseout: function(evt) {
|
||||||
if(OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
|
if(OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
|
||||||
this.stoppedDown = this.stopDown;
|
this.stoppedDown = this.stopDown;
|
||||||
this.mouseDown = false;
|
this.mouseDown = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,7 @@
|
|||||||
t.ok(evt.xy.x == testEvents.done.xy.x &&
|
t.ok(evt.xy.x == testEvents.done.xy.x &&
|
||||||
evt.xy.y == testEvents.done.xy.y,
|
evt.xy.y == testEvents.done.xy.y,
|
||||||
"mouseout calls Util.mouseLeft with the correct event");
|
"mouseout calls Util.mouseLeft with the correct event");
|
||||||
t.eq(element.id, map.viewPortDiv.id,
|
t.eq(element.id, map.eventsDiv.id,
|
||||||
"mouseout calls Util.mouseLeft with the correct element");
|
"mouseout calls Util.mouseLeft with the correct element");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user