diff --git a/externs/olx.js b/externs/olx.js index 1096b44768..2165836267 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -4335,7 +4335,7 @@ olx.layer.VectorOptions.prototype.source; /** * Declutter images and text. Decluttering is applied to all image and text - * styles, and the priority is defined by the z-index of the style. Higher + * styles, and the priority is defined by the z-index of the style. Lower * z-index means higher priority. Default is `false`. * @type {boolean|undefined} * @api @@ -4513,7 +4513,7 @@ olx.layer.VectorTileOptions.prototype.source; /** * Declutter images and text. Decluttering is applied to all image and text - * styles, and the priority is defined by the z-index of the style. Higher + * styles, and the priority is defined by the z-index of the style. Lower * z-index means higher priority. When set to `true`, a `renderMode` of * `'image'` will be overridden with `'hybrid'`. Default is `false`. * @type {boolean|undefined} diff --git a/src/ol/render/canvas/replaygroup.js b/src/ol/render/canvas/replaygroup.js index 92cc0f595c..f811872488 100644 --- a/src/ol/render/canvas/replaygroup.js +++ b/src/ol/render/canvas/replaygroup.js @@ -187,7 +187,7 @@ ol.render.canvas.ReplayGroup.getCircleArray_ = function(radius) { ol.render.canvas.ReplayGroup.replayDeclutter = function(declutterReplays, context, rotation) { var zs = Object.keys(declutterReplays).map(Number).sort(ol.array.numberSafeCompareFunction); - for (var z = zs.length - 1; z >= 0; --z) { + for (var z = 0, zz = zs.length; z < zz; ++z) { var replayData = declutterReplays[zs[z].toString()]; for (var i = 0, ii = replayData.length; i < ii;) { var replay = replayData[i++];