Changeset 3993
- Timestamp:
- 08/23/07 12:05:51 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/camptocamp/feature/lib/OpenLayers/Control/DragFeature.js
r3989 r3993 204 204 */ 205 205 moveFeature: function(pixel) { 206 var lonlat = this.snappingHandler.getPoint(this.map.getLonLatFromPixel(pixel)); 207 this.feature.geometry.x = lonlat.lon; 208 this.feature.geometry.y = lonlat.lat; 209 this.feature.geometry.clearBounds(); 206 var snapped = this.snappingHandler.getPoint(this.map.getLonLatFromPixel(pixel)); 207 this.feature.geometry.move(snapped.lon - this.feature.geometry.x, 208 snapped.lat - this.feature.geometry.y); 210 209 211 210 this.layer.drawFeature(this.feature); sandbox/camptocamp/feature/lib/OpenLayers/Geometry/Point.js
r3935 r3993 141 141 this.x = this.x + x; 142 142 this.y = this.y + y; 143 this.clearBounds(); 143 144 }, 144 145 … … 157 158 this.x = origin.x + (radius * Math.cos(theta)); 158 159 this.y = origin.y + (radius * Math.sin(theta)); 160 this.clearBounds(); 159 161 }, 160 162 … … 174 176 this.x = origin.x + (scale * (this.x - origin.x)); 175 177 this.y = origin.y + (scale * (this.y - origin.y)); 178 this.clearBounds(); 176 179 }, 177 180 sandbox/camptocamp/feature/lib/OpenLayers/Handler/Path.js
r3979 r3993 186 186 187 187 var snapped = this.snappingHandler.getPoint(this.map.getLonLatFromPixel(evt.xy)); 188 this.point.geometry. x = snapped.lon;189 this.point.geometry.y = snapped.lat;188 this.point.geometry.move(snapped.lon - this.point.geometry.x, 189 snapped.lat - this.point.geometry.y); 190 190 191 191 if(this.mouseDown && this.freehandMode(evt)) {
