New createVertices option for Control.ModifyFeature

This commit is contained in:
fredj
2012-02-09 13:43:42 +01:00
parent 85b9d5f7f9
commit 6daecd677d
3 changed files with 33 additions and 1 deletions

View File

@@ -96,6 +96,7 @@
if (rotate || drag) {
controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE;
}
controls.modify.createVertices = document.getElementById("createVertices").checked;
var sides = parseInt(document.getElementById("sides").value);
sides = Math.max(3, isNaN(sides) ? 0 : sides);
controls.regular.handler.sides = sides;
@@ -161,6 +162,11 @@
onclick="toggleControl(this);" />
<label for="modifyToggle">modify feature</label>
<ul>
<li>
<input id="createVertices" type="checkbox" checked
name="createVertices" onchange="update()" />
<label for="createVertices">allow vertices creation</label>
</li>
<li>
<input id="rotate" type="checkbox"
name="rotate" onchange="update()" />