the drag handler's mouseout func should check if the mouse left the map viewport div as opposed to the map div, r=ahocevar (closes #2941)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10956 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -313,7 +313,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.div)) {
|
if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
|
||||||
if(this.documentDrag === true) {
|
if(this.documentDrag === true) {
|
||||||
this.addDocumentEvents();
|
this.addDocumentEvents();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -251,7 +251,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.div.id,
|
t.eq(element.id, map.viewPortDiv.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