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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user