Merge pull request #883 from tschaub/nicer-defaults
Setting `transitionEffect: "resize"` by default for `OpenLayers.Layer.Grid`. Setting `enableKinetic: true` for `OpenLayers.Control.DragPan`.
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
|
||||
* set to true or to an object. If set to an object this
|
||||
* object will be passed to the {<OpenLayers.Kinetic>}
|
||||
* 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, {
|
||||
* <panMapDone> 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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user