New createVertices option for Control.ModifyFeature
This commit is contained in:
@@ -137,6 +137,13 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
mode: null,
|
||||
|
||||
/**
|
||||
* APIProperty: createVertices
|
||||
* {Boolean} Create new vertices by dragging the virtual vertices
|
||||
* in the middle of each edge. Default is true.
|
||||
*/
|
||||
createVertices: true,
|
||||
|
||||
/**
|
||||
* Property: modified
|
||||
* {Boolean} The currently selected feature has been modified.
|
||||
@@ -677,7 +684,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
}
|
||||
|
||||
// add virtual vertices in the middle of each edge
|
||||
if(geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint") {
|
||||
if (control.createVertices && geometry.CLASS_NAME != "OpenLayers.Geometry.MultiPoint") {
|
||||
for(i=0, len=geometry.components.length; i<len-1; ++i) {
|
||||
var prevVertex = geometry.components[i];
|
||||
var nextVertex = geometry.components[i + 1];
|
||||
|
||||
Reference in New Issue
Block a user