Skip to content

Commit

Permalink
[AH-1831] openlayers document has been changed regarding onselectstar…
Browse files Browse the repository at this point in the history
…t function
  • Loading branch information
Hanna Visuri committed Sep 18, 2014
1 parent 3e21846 commit 9bfa975
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions libraries/OpenLayers/OpenLayers.2_13_1-full-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -21352,10 +21352,10 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
OpenLayers.Event.preventDefault(evt);

if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart ?
document.onselectstart : OpenLayers.Function.True;
this.oldOnselectstart = this.map.viewPortDiv.onselectstart ?
this.map.viewPortDiv.onselectstart : OpenLayers.Function.True;
}
document.onselectstart = OpenLayers.Function.False;
this.map.viewPortDiv.onselectstart = OpenLayers.Function.False;

propagate = !this.stopDown;
} else {
Expand Down Expand Up @@ -21400,8 +21400,8 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
this.move(evt);
this.callback("move", [evt.xy]);
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart;
document.onselectstart = OpenLayers.Function.False;
this.oldOnselectstart = this.map.viewPortDiv.onselectstart;
this.map.viewPortDiv.onselectstart = OpenLayers.Function.False;
}
this.last = evt.xy;
}
Expand Down Expand Up @@ -21435,7 +21435,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
if(dragged) {
this.callback("done", [evt.xy]);
}
document.onselectstart = this.oldOnselectstart;
this.map.viewPortDiv.onselectstart = this.oldOnselectstart;
}
return true;
},
Expand Down Expand Up @@ -21624,8 +21624,8 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
if(dragged) {
this.callback("done", [evt.xy]);
}
if(document.onselectstart) {
document.onselectstart = this.oldOnselectstart;
if(this.map.viewPortDiv.onselectstart) {
this.map.viewPortDiv.onselectstart = this.oldOnselectstart;
}
}
}
Expand Down

0 comments on commit 9bfa975

Please sign in to comment.