Snap immediately on starting a sketch. r=ahocevar (closes #2039)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9270 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-12 15:38:41 +00:00
parent dfcf68007e
commit 29ba60eb59
2 changed files with 26 additions and 2 deletions

View File

@@ -298,6 +298,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
if(activated) {
if(this.layer && this.layer.events) {
this.layer.events.on({
sketchstarted: this.onSketchModified,
sketchmodified: this.onSketchModified,
vertexmodified: this.onVertexModified,
scope: this
@@ -317,6 +318,7 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
if(deactivated) {
if(this.layer && this.layer.events) {
this.layer.events.un({
sketchstarted: this.onSketchModified,
sketchmodified: this.onSketchModified,
vertexmodified: this.onVertexModified,
scope: this