From 891cd35f60cbd129c346f54bd8aaf1eea30e0103 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:17:55 -0700 Subject: [PATCH 1/3] Kinetic dragging by default --- lib/OpenLayers/Control/DragPan.js | 10 +++++----- notes/2.13.md | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Control/DragPan.js b/lib/OpenLayers/Control/DragPan.js index 1b9bd1fab4..2e2146f2cd 100644 --- a/lib/OpenLayers/Control/DragPan.js +++ b/lib/OpenLayers/Control/DragPan.js @@ -56,11 +56,11 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { * {Boolean} Set this option to enable "kinetic dragging". Can be * set to true or to an object. If set to an object this * object will be passed to the {} - * constructor. Defaults to false. - * If you set this property, you should ensure that - * OpenLayers/Kinetic.js is included in your build config + * constructor. Defaults to true. + * To get kinetic dragging, ensure that OpenLayers/Kinetic.js is + * included in your build config. */ - enableKinetic: false, + enableKinetic: true, /** * APIProperty: kineticInterval @@ -77,7 +77,7 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { * as callbacks. */ draw: function() { - if(this.enableKinetic) { + if (this.enableKinetic && OpenLayers.Kinetic) { var config = {interval: this.kineticInterval}; if(typeof this.enableKinetic === "object") { config = OpenLayers.Util.extend(config, this.enableKinetic); diff --git a/notes/2.13.md b/notes/2.13.md index dd3ca649a1..288d980b76 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -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. +## 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 We do no longer create a global variable '$' when such a symbol isn't already From 0cf98333625bb5fa6292accb414aa3714e74f372 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:18:07 -0700 Subject: [PATCH 2/3] Resize transitions by default --- lib/OpenLayers/Layer/Grid.js | 8 ++++---- notes/2.13.md | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 2e09885e94..304920f217 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -96,16 +96,16 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {String} The transition effect to use when the map is zoomed. * Two posible values: * - * null - No transition effect (the default). * "resize" - Existing tiles are resized on zoom to provide a visual * effect of the zoom having taken place immediately. As the * new tiles become available, they are drawn over top of the - * resized tiles. + * resized tiles (this is the default setting). + * null - No transition effect. * * Using "resize" on non-opaque layers can cause undesired visual - * effects. This is therefore discouraged. + * effects. Set transitionEffect to null in this case. */ - transitionEffect: null, + transitionEffect: "resize", /** * APIProperty: numLoadingTiles diff --git a/notes/2.13.md b/notes/2.13.md index 288d980b76..9af7553152 100644 --- a/notes/2.13.md +++ b/notes/2.13.md @@ -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. +## Layer.Grid: Resize transitions by default + +The `transitionEffect` property for grid layers has been changed to "resize" by default. This allows smooth transitions with animated zooming (also enabled by default). If resize transitions are not wanted for individual layers, set `transitionEffect` to `null`. + ## 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. From a2896beafdb1bbdcce99c86c0bf088da5a66bc93 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 15:26:05 -0700 Subject: [PATCH 3/3] As the comments mention, this assumes null transitionEffect --- tests/Layer/Grid.html | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Layer/Grid.html b/tests/Layer/Grid.html index 68c65ecfbe..1a4d9abfca 100644 --- a/tests/Layer/Grid.html +++ b/tests/Layer/Grid.html @@ -1181,6 +1181,7 @@ var map = new OpenLayers.Map('map', {zoomMethod: null}); var layer = new OpenLayers.Layer.WMS('', '', {}, { isBaseLayer: true, + transitionEffect: null, singleTile: true, ratio: 1.1 });