diff --git a/examples/modify-feature.html b/examples/modify-feature.html index 70b3ad43b4..d3706cbaf4 100644 --- a/examples/modify-feature.html +++ b/examples/modify-feature.html @@ -70,14 +70,16 @@ var resize = document.getElementById("resize").checked; if(resize) { controls.modify.mode |= OpenLayers.Control.ModifyFeature.RESIZE; + var keepAspectRatio = document.getElementById("keepAspectRatio").checked; + if (keepAspectRatio) { + controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE; + } } var drag = document.getElementById("drag").checked; if(drag) { controls.modify.mode |= OpenLayers.Control.ModifyFeature.DRAG; } - // disable reshape mode if at least one of modes rotate, resize, - // drag is enabled - if (rotate || resize || drag) { + if (rotate || drag) { controls.modify.mode &= ~OpenLayers.Control.ModifyFeature.RESHAPE; } var sides = parseInt(document.getElementById("sides").value); @@ -151,6 +153,9 @@ + ( + )