#571: Don't subclass Geometry.Point from LonLat, and all neccesary associated

changes. Reviewed by tschaub (thx)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-03-31 18:30:56 +00:00
parent 45da80f8ad
commit 4aec64aa67
10 changed files with 67 additions and 110 deletions

View File

@@ -102,8 +102,8 @@ OpenLayers.Handler.Path.prototype =
*/
modifyGeometry: function() {
var index = this.line.components.length - 1;
this.line.components[index].setX(this.point.x);
this.line.components[index].setY(this.point.y);
this.line.components[index].x = this.point.x;
this.line.components[index].y = this.point.y;
},
/**
@@ -141,8 +141,8 @@ OpenLayers.Handler.Path.prototype =
this.mouseDown = true;
this.lastDown = evt.xy;
var lonlat = this.control.map.getLonLatFromPixel(evt.xy);
this.point.setX(lonlat.lon);
this.point.setY(lonlat.lat);
this.point.x = lonlat.lon;
this.point.y = lonlat.lat;
if((this.lastUp == null) || !this.lastUp.equals(evt.xy)) {
this.addPoint();
}
@@ -161,8 +161,8 @@ OpenLayers.Handler.Path.prototype =
mousemove: function (evt) {
if(this.drawing) {
var lonlat = this.map.getLonLatFromPixel(evt.xy);
this.point.setX(lonlat.lon);
this.point.setY(lonlat.lat);
this.point.x = lonlat.lon;
this.point.y = lonlat.lat;
if(this.mouseDown && this.freehandMode(evt)) {
this.addPoint();
} else {