Kinetic dragging by default
This commit is contained in:
@@ -56,11 +56,11 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* {Boolean} Set this option to enable "kinetic dragging". Can be
|
* {Boolean} Set this option to enable "kinetic dragging". Can be
|
||||||
* set to true or to an object. If set to an object this
|
* set to true or to an object. If set to an object this
|
||||||
* object will be passed to the {<OpenLayers.Kinetic>}
|
* object will be passed to the {<OpenLayers.Kinetic>}
|
||||||
* constructor. Defaults to false.
|
* constructor. Defaults to true.
|
||||||
* If you set this property, you should ensure that
|
* To get kinetic dragging, ensure that OpenLayers/Kinetic.js is
|
||||||
* OpenLayers/Kinetic.js is included in your build config
|
* included in your build config.
|
||||||
*/
|
*/
|
||||||
enableKinetic: false,
|
enableKinetic: true,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIProperty: kineticInterval
|
* APIProperty: kineticInterval
|
||||||
@@ -77,7 +77,7 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* <panMapDone> as callbacks.
|
* <panMapDone> as callbacks.
|
||||||
*/
|
*/
|
||||||
draw: function() {
|
draw: function() {
|
||||||
if(this.enableKinetic) {
|
if (this.enableKinetic && OpenLayers.Kinetic) {
|
||||||
var config = {interval: this.kineticInterval};
|
var config = {interval: this.kineticInterval};
|
||||||
if(typeof this.enableKinetic === "object") {
|
if(typeof this.enableKinetic === "object") {
|
||||||
config = OpenLayers.Util.extend(config, this.enableKinetic);
|
config = OpenLayers.Util.extend(config, this.enableKinetic);
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ The `moveDelay` is the replacement for the `tileLoadingDelay` layer config optio
|
|||||||
|
|
||||||
In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager.
|
In general, when targeting mobile devices or when using slow servers or connections for tiled layers, it is recommended to configure the map with a TileManager.
|
||||||
|
|
||||||
|
## Control.DragPan: Kinetic by default
|
||||||
|
|
||||||
|
The `enableKinetic` property for the DragPan control has been changed to true by default. This will enable kinetic panning only if the `OpenLayers/Kinetic.js` file is included in your build.
|
||||||
|
|
||||||
## window.$ is no longer an alias for OpenLayers.Util.getElement
|
## window.$ is no longer an alias for OpenLayers.Util.getElement
|
||||||
|
|
||||||
We do no longer create a global variable '$' when such a symbol isn't already
|
We do no longer create a global variable '$' when such a symbol isn't already
|
||||||
|
|||||||
Reference in New Issue
Block a user