Give lower z-index priority (painter's order)

This commit is contained in:
Andreas Hocevar
2017-10-21 21:12:24 +02:00
parent b3f9e4e8ef
commit 80e67bac7a
2 changed files with 3 additions and 3 deletions

View File

@@ -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}

View File

@@ -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++];