replace all usage of copyOf() with clone(). Now copyOf() is officially deprecated and unused. supported only if users out there have used it, but we can phase it out in the next official release.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@961 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
1 parent
fc41d9dac1
commit
e91d0546ee
14 files changed
+35
-35
No files matched your search
@@ -58,7 +58,7 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.performedDrag = false;
|
||||
if (evt.shiftKey) {
|
||||
this.map.div.style.cursor = "crosshair";
|
||||
@@ -102,7 +102,7 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
size.h / 2 + deltaY);
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( newXY );
|
||||
this.map.setCenter(newCenter, null, true);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.map.div.style.cursor = "move";
|
||||
}
|
||||
this.performedDrag = true;
|
||||
|
||||
@@ -94,7 +94,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
*/
|
||||
defaultMouseDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
if (evt.shiftKey && this.mode !="zoombox") {
|
||||
this.switchModeTo("zoombox");
|
||||
} else if (evt.altKey && this.mode !="measure") {
|
||||
@@ -215,7 +215,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
size.h / 2 + deltaY);
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( newXY );
|
||||
this.map.setCenter(newCenter, null, true);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -147,8 +147,8 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.map.events.register("mousemove", this, this.passEventToSlider);
|
||||
this.map.events.register("mouseup", this, this.passEventToSlider);
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.zoomStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.zoomStart = evt.xy.clone();
|
||||
this.div.style.cursor = "move";
|
||||
Event.stop(evt);
|
||||
},
|
||||
@@ -168,7 +168,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
var newTop = parseInt(this.slider.style.top) - deltaY;
|
||||
this.slider.style.top = newTop+"px";
|
||||
}
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
}
|
||||
Event.stop(evt);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user