Rename replayes to replays
This commit is contained in:
@@ -1202,7 +1202,7 @@ ol.render.canvas.ReplayGroup = function(pixelRatio, tolerance) {
|
|||||||
* @type {Object.<string,
|
* @type {Object.<string,
|
||||||
* Object.<ol.render.ReplayType, ol.render.canvas.Replay>>}
|
* Object.<ol.render.ReplayType, ol.render.canvas.Replay>>}
|
||||||
*/
|
*/
|
||||||
this.replayesByZIndex_ = {};
|
this.replaysByZIndex_ = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {HTMLCanvasElement}
|
* @type {HTMLCanvasElement}
|
||||||
@@ -1240,7 +1240,7 @@ ol.render.canvas.ReplayGroup = function(pixelRatio, tolerance) {
|
|||||||
ol.render.canvas.ReplayGroup.prototype.replay = function(context, extent,
|
ol.render.canvas.ReplayGroup.prototype.replay = function(context, extent,
|
||||||
transform, renderGeometryFunction) {
|
transform, renderGeometryFunction) {
|
||||||
/** @type {Array.<number>} */
|
/** @type {Array.<number>} */
|
||||||
var zs = goog.array.map(goog.object.getKeys(this.replayesByZIndex_), Number);
|
var zs = goog.array.map(goog.object.getKeys(this.replaysByZIndex_), Number);
|
||||||
goog.array.sort(zs);
|
goog.array.sort(zs);
|
||||||
return this.replay_(
|
return this.replay_(
|
||||||
zs, context, extent, transform, renderGeometryFunction);
|
zs, context, extent, transform, renderGeometryFunction);
|
||||||
@@ -1263,11 +1263,11 @@ ol.render.canvas.ReplayGroup.prototype.replay = function(context, extent,
|
|||||||
ol.render.canvas.ReplayGroup.prototype.replayHitDetection_ =
|
ol.render.canvas.ReplayGroup.prototype.replayHitDetection_ =
|
||||||
function(zs, context, extent, transform, renderGeometryFunction,
|
function(zs, context, extent, transform, renderGeometryFunction,
|
||||||
geometryCallback) {
|
geometryCallback) {
|
||||||
var i, ii, replayes, replayType, replay, result;
|
var i, ii, replays, replayType, replay, result;
|
||||||
for (i = 0, ii = zs.length; i < ii; ++i) {
|
for (i = 0, ii = zs.length; i < ii; ++i) {
|
||||||
replayes = this.replayesByZIndex_[zs[i].toString()];
|
replays = this.replaysByZIndex_[zs[i].toString()];
|
||||||
for (replayType in replayes) {
|
for (replayType in replays) {
|
||||||
replay = replayes[replayType];
|
replay = replays[replayType];
|
||||||
if (ol.extent.intersects(extent, replay.getExtent())) {
|
if (ol.extent.intersects(extent, replay.getExtent())) {
|
||||||
result = replay.replayHitDetection(
|
result = replay.replayHitDetection(
|
||||||
context, transform, renderGeometryFunction, geometryCallback);
|
context, transform, renderGeometryFunction, geometryCallback);
|
||||||
@@ -1294,11 +1294,11 @@ ol.render.canvas.ReplayGroup.prototype.replayHitDetection_ =
|
|||||||
*/
|
*/
|
||||||
ol.render.canvas.ReplayGroup.prototype.replay_ =
|
ol.render.canvas.ReplayGroup.prototype.replay_ =
|
||||||
function(zs, context, extent, transform, renderGeometryFunction) {
|
function(zs, context, extent, transform, renderGeometryFunction) {
|
||||||
var i, ii, replayes, replayType, replay, result;
|
var i, ii, replays, replayType, replay, result;
|
||||||
for (i = 0, ii = zs.length; i < ii; ++i) {
|
for (i = 0, ii = zs.length; i < ii; ++i) {
|
||||||
replayes = this.replayesByZIndex_[zs[i].toString()];
|
replays = this.replaysByZIndex_[zs[i].toString()];
|
||||||
for (replayType in replayes) {
|
for (replayType in replays) {
|
||||||
replay = replayes[replayType];
|
replay = replays[replayType];
|
||||||
if (ol.extent.intersects(extent, replay.getExtent())) {
|
if (ol.extent.intersects(extent, replay.getExtent())) {
|
||||||
result = replay.replay(
|
result = replay.replay(
|
||||||
context, transform, renderGeometryFunction);
|
context, transform, renderGeometryFunction);
|
||||||
@@ -1333,7 +1333,7 @@ ol.render.canvas.ReplayGroup.prototype.forEachGeometryAtCoordinate = function(
|
|||||||
-coordinate[0], -coordinate[1]);
|
-coordinate[0], -coordinate[1]);
|
||||||
|
|
||||||
/** @type {Array.<number>} */
|
/** @type {Array.<number>} */
|
||||||
var zs = goog.array.map(goog.object.getKeys(this.replayesByZIndex_), Number);
|
var zs = goog.array.map(goog.object.getKeys(this.replaysByZIndex_), Number);
|
||||||
goog.array.sort(zs, function(a, b) { return b - a; });
|
goog.array.sort(zs, function(a, b) { return b - a; });
|
||||||
|
|
||||||
var context = this.hitDetectionContext_;
|
var context = this.hitDetectionContext_;
|
||||||
@@ -1364,11 +1364,11 @@ ol.render.canvas.ReplayGroup.prototype.forEachGeometryAtCoordinate = function(
|
|||||||
*/
|
*/
|
||||||
ol.render.canvas.ReplayGroup.prototype.finish = function() {
|
ol.render.canvas.ReplayGroup.prototype.finish = function() {
|
||||||
var zKey;
|
var zKey;
|
||||||
for (zKey in this.replayesByZIndex_) {
|
for (zKey in this.replaysByZIndex_) {
|
||||||
var replayes = this.replayesByZIndex_[zKey];
|
var replays = this.replaysByZIndex_[zKey];
|
||||||
var replayKey;
|
var replayKey;
|
||||||
for (replayKey in replayes) {
|
for (replayKey in replays) {
|
||||||
replayes[replayKey].finish();
|
replays[replayKey].finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1380,17 +1380,17 @@ ol.render.canvas.ReplayGroup.prototype.finish = function() {
|
|||||||
ol.render.canvas.ReplayGroup.prototype.getReplay =
|
ol.render.canvas.ReplayGroup.prototype.getReplay =
|
||||||
function(zIndex, replayType) {
|
function(zIndex, replayType) {
|
||||||
var zIndexKey = goog.isDef(zIndex) ? zIndex.toString() : '0';
|
var zIndexKey = goog.isDef(zIndex) ? zIndex.toString() : '0';
|
||||||
var replayes = this.replayesByZIndex_[zIndexKey];
|
var replays = this.replaysByZIndex_[zIndexKey];
|
||||||
if (!goog.isDef(replayes)) {
|
if (!goog.isDef(replays)) {
|
||||||
replayes = {};
|
replays = {};
|
||||||
this.replayesByZIndex_[zIndexKey] = replayes;
|
this.replaysByZIndex_[zIndexKey] = replays;
|
||||||
}
|
}
|
||||||
var replay = replayes[replayType];
|
var replay = replays[replayType];
|
||||||
if (!goog.isDef(replay)) {
|
if (!goog.isDef(replay)) {
|
||||||
var constructor = ol.render.canvas.BATCH_CONSTRUCTORS_[replayType];
|
var constructor = ol.render.canvas.BATCH_CONSTRUCTORS_[replayType];
|
||||||
goog.asserts.assert(goog.isDef(constructor));
|
goog.asserts.assert(goog.isDef(constructor));
|
||||||
replay = new constructor(this.pixelRatio_, this.tolerance_);
|
replay = new constructor(this.pixelRatio_, this.tolerance_);
|
||||||
replayes[replayType] = replay;
|
replays[replayType] = replay;
|
||||||
}
|
}
|
||||||
return replay;
|
return replay;
|
||||||
};
|
};
|
||||||
@@ -1400,7 +1400,7 @@ ol.render.canvas.ReplayGroup.prototype.getReplay =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.ReplayGroup.prototype.isEmpty = function() {
|
ol.render.canvas.ReplayGroup.prototype.isEmpty = function() {
|
||||||
return goog.object.isEmpty(this.replayesByZIndex_);
|
return goog.object.isEmpty(this.replaysByZIndex_);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user