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:
Éric Lemoine
2010-12-08 16:06:42 +00:00
parent 9f47e1915d
commit 43d9e2e1a4
2 changed files with 2 additions and 2 deletions

View File

@@ -313,7 +313,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
* {Boolean} Let the event propagate.
*/
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) {
this.addDocumentEvents();
} else {

View File

@@ -251,7 +251,7 @@
t.ok(evt.xy.x == testEvents.done.xy.x &&
evt.xy.y == testEvents.done.xy.y,
"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");
return true;
}