Rename defaultSort to numberSafeCompareFunction on ol.array

This commit is contained in:
Bart van den Eijnden
2015-12-16 13:40:05 +01:00
parent 88255fd776
commit 25e0053a13
10 changed files with 14 additions and 15 deletions

View File

@@ -722,7 +722,7 @@ ol.render.canvas.Immediate.prototype.drawText = goog.abstractMethod;
ol.render.canvas.Immediate.prototype.flush = function() {
/** @type {Array.<number>} */
var zs = Object.keys(this.callbacksByZIndex_).map(Number);
zs.sort(ol.array.defaultCompare);
zs.sort(ol.array.numberSafeCompareFunction);
var i, ii, callbacks, j, jj;
for (i = 0, ii = zs.length; i < ii; ++i) {
callbacks = this.callbacksByZIndex_[zs[i].toString()];

View File

@@ -2001,7 +2001,7 @@ ol.render.canvas.ReplayGroup.prototype.replay = function(
/** @type {Array.<number>} */
var zs = Object.keys(this.replaysByZIndex_).map(Number);
zs.sort(ol.array.defaultCompare);
zs.sort(ol.array.numberSafeCompareFunction);
// setup clipping so that the parts of over-simplified geometries are not
// visible outside the current extent when panning

View File

@@ -80,7 +80,7 @@ goog.inherits(ol.render.webgl.Immediate, ol.render.VectorContext);
ol.render.webgl.Immediate.prototype.flush = function() {
/** @type {Array.<number>} */
var zs = Object.keys(this.callbacksByZIndex_).map(Number);
zs.sort(ol.array.defaultCompare);
zs.sort(ol.array.numberSafeCompareFunction);
var i, ii, callbacks, j, jj;
for (i = 0, ii = zs.length; i < ii; ++i) {
callbacks = this.callbacksByZIndex_[zs[i].toString()];