Compare commits

..

4 Commits

Author SHA1 Message Date
Bart van den Eijnden
572d78fb4d set version number to 2.13-rc3 2013-05-17 13:16:49 +02:00
ahocevar
1d948fc914 Make sure that drawTilesFromQueue gets executed
For events other than move, the tile queue may not be populated yet when
updateTimeout is called. So instead of checking for the queue's length,
we register the timer unconditionally in these cases.
2013-05-17 13:15:01 +02:00
ahocevar
449b85966e .olTileReplacing is on the parent of .olTileImage when using frame 2013-05-17 13:14:36 +02:00
ahocevar
1223ea339d Use getTile() instead of imgDiv to get the correct element
The correct way to get the markup of a tile is to use getTile() - the
imgDiv will only be available if the tile does not use a frame.
2013-05-17 13:14:16 +02:00
5 changed files with 15 additions and 9 deletions

View File

@@ -425,4 +425,4 @@
* When asking questions or reporting issues, make sure to include the output of
* OpenLayers.VERSION_NUMBER in the question or issue-description.
*/
OpenLayers.VERSION_NUMBER="Release 2.13-rc2";
OpenLayers.VERSION_NUMBER="Release 2.13-rc3";

View File

@@ -1100,7 +1100,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
this.events.triggerEvent("tileloadstart", {tile: tile});
this.numLoadingTiles++;
if (!this.singleTile && this.backBuffer && this.gridResolution === this.backBufferResolution) {
OpenLayers.Element.addClass(tile.imgDiv, replacingCls);
OpenLayers.Element.addClass(tile.getTile(), replacingCls);
}
};
@@ -1112,13 +1112,14 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
aborted: aborted
});
if (!this.singleTile && !aborted && this.backBuffer && this.gridResolution === this.backBufferResolution) {
if (OpenLayers.Element.getStyle(tile.imgDiv, 'display') === 'none') {
var tileDiv = tile.getTile();
if (OpenLayers.Element.getStyle(tileDiv, 'display') === 'none') {
var bufferTile = document.getElementById(tile.id + '_bb');
if (bufferTile) {
bufferTile.parentNode.removeChild(bufferTile);
}
}
OpenLayers.Element.removeClass(tile.imgDiv, replacingCls);
OpenLayers.Element.removeClass(tileDiv, replacingCls);
}
//if that was the last tile, then trigger a 'loadend' on the layer
if (this.numLoadingTiles === 0) {

View File

@@ -7,7 +7,7 @@ var OpenLayers = {
/**
* Constant: VERSION_NUMBER
*/
VERSION_NUMBER: "Release 2.13-rc2",
VERSION_NUMBER: "Release 2.13-rc3",
/**
* Constant: singleFile

View File

@@ -175,7 +175,7 @@ OpenLayers.TileManager = OpenLayers.Class({
* evt - {Object} Listener argument
*/
move: function(evt) {
this.updateTimeout(evt.object, this.moveDelay);
this.updateTimeout(evt.object, this.moveDelay, true);
},
/**
@@ -272,11 +272,16 @@ OpenLayers.TileManager = OpenLayers.Class({
* Parameters:
* map - {<OpenLayers.Map>} The map to update the timeout for
* delay - {Number} The delay to apply
* nice - {Boolean} If true, the timeout function will only be created if
* the tilequeue is not empty. This is used by the move handler to
* avoid impacts on dragging performance. For other events, the tile
* queue may not be populated yet, so we need to set the timer
* regardless of the queue size.
*/
updateTimeout: function(map, delay) {
updateTimeout: function(map, delay, nice) {
window.clearTimeout(this.tileQueueId[map.id]);
var tileQueue = this.tileQueue[map.id];
if (tileQueue.length) {
if (!nice || tileQueue.length) {
this.tileQueueId[map.id] = window.setTimeout(
OpenLayers.Function.bind(function() {
this.drawTilesFromQueue(map);

View File

@@ -506,7 +506,7 @@ a.olControlZoomOut {
}
/* when replacing tiles, do not show tile and backbuffer at the same time */
.olTileImage.olTileReplacing {
.olTileReplacing {
display: none;
}