diff options
| -rw-r--r-- | static/edit_route_map.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/static/edit_route_map.js b/static/edit_route_map.js index 92f61f1..e366f0b 100644 --- a/static/edit_route_map.js +++ b/static/edit_route_map.js @@ -39,9 +39,11 @@ function featureCreated(event) { help_route_create.style.display = 'None'; } document.getElementById('help-route-modify').style.display = 'block'; + pathModify.activate(); updateForm(event); - selectControl.select(event.feature); + pathModify.selectControl.select(event.feature); + } function initFeature(json_geometry){ @@ -77,7 +79,6 @@ var currentControl = pathCreate; var pathModify = new OpenLayers.Control.ModifyFeature(vectors, {clickout:false, toggle:false}); -var selectControl = new OpenLayers.Control.SelectFeature(vectors); /* main initialisation function */ function init(){ @@ -105,7 +106,7 @@ function toggleDrawOn() { document.getElementById('draw-toggle-off').style.display = 'None'; document.getElementById('draw-toggle-on').style.display = 'block'; if (currentFeature){ - selectControl.select(currentFeature); + pathModify.selectControl.select(currentFeature); } } |
