From 8c6466bf2ae55f741af4d467dd32af89a5d9d7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 31 Mar 2012 21:32:49 +0200 Subject: [PATCH] move transitionEffect to Layer.Grid.prototype, and discourage the use of transitionEffect:"resize" on non-opaque layers --- lib/OpenLayers/Layer.js | 14 -------------- lib/OpenLayers/Layer/Grid.js | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/OpenLayers/Layer.js b/lib/OpenLayers/Layer.js index 1cc11a419d..05747f2cbf 100644 --- a/lib/OpenLayers/Layer.js +++ b/lib/OpenLayers/Layer.js @@ -320,20 +320,6 @@ OpenLayers.Layer = OpenLayers.Class({ */ wrapDateLine: false, - /** - * APIProperty: transitionEffect - * {String} The transition effect to use when the map is panned or - * zoomed. - * - * There are currently two supported 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. - */ - transitionEffect: null, - /** * Property: metadata * {Object} This object can be used to store additional information on a diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index fda975b16e..2911ddf98a 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -91,6 +91,22 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { */ buffer: 0, + /** + * APIProperty: transitionEffect + * {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. + * + * Using "resize" on non-opaque layers can cause undesired visual + * effects. This is therefore discouraged. + */ + transitionEffect: null, + /** * APIProperty: numLoadingTiles * {Integer} How many tiles are still loading?