Merge pull request #644 from fastrde/ModifyFeatureDocumentDrag

Adds documentDrag to ModifyFeature
This commit is contained in:
ahocevar
2012-08-27 02:53:39 -07:00

View File

@@ -22,6 +22,13 @@
*/
OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: documentDrag
* {Boolean} If set to true, dragging vertices will continue even if the
* mouse cursor leaves the map viewport. Default is false.
*/
documentDrag: false,
/**
* APIProperty: geometryTypes
* {Array(String)} To restrict modification to a limited set of geometry
@@ -245,6 +252,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, {
// configure the drag control
var dragOptions = {
documentDrag: this.documentDrag,
geometryTypes: ["OpenLayers.Geometry.Point"],
onStart: function(feature, pixel) {
control.dragStart.apply(control, [feature, pixel]);