Inserted documentDrag in ModifyFeature so that you can drag vertices over the viewport of the map in analogy to the DragFeature-Control. documentDrag is internaly passed to the DragFreature that's used by ModifyFeature.

This commit is contained in:
fastr
2012-08-25 23:30:27 +02:00
parent 1d670fcddb
commit 053dba59a1

View File

@@ -22,6 +22,12 @@
*/
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 +251,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]);