patch for improved mousedragging. We were able to test this on my eeepc
and get a very obvious speedup in performance. This adds a configurable 'interval' to the dragpan control (and an interval to the 'drag' control, defaulting to 0px). Patch put together by tcoulter. (Closes #1509) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7608 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -28,14 +28,27 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
panned: false,
|
||||
|
||||
/**
|
||||
* Property: interval
|
||||
* The number of milliseconds that should ellapse before
|
||||
* panning the map again. Set this to increase dragging performance.
|
||||
* Defaults to 25 milliseconds.
|
||||
*/
|
||||
interval: 25,
|
||||
|
||||
/**
|
||||
* Method: draw
|
||||
* Creates a Drag handler, using <panMap> and
|
||||
* <panMapDone> as callbacks.
|
||||
*/
|
||||
draw: function() {
|
||||
this.handler = new OpenLayers.Handler.Drag(this,
|
||||
{"move": this.panMap, "done": this.panMapDone});
|
||||
this.handler = new OpenLayers.Handler.Drag(this, {
|
||||
"move": this.panMap,
|
||||
"done": this.panMapDone
|
||||
}, {
|
||||
interval: this.interval
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user