Change getUid return type from number to string

This commit is contained in:
Frederic Junod
2018-10-17 08:58:50 +02:00
parent a85099a36b
commit 041836c645
33 changed files with 78 additions and 92 deletions
+4 -6
View File
@@ -536,7 +536,7 @@ class WebGLLineStringReplay extends WebGLReplay {
* @param {Object} skippedFeaturesHash Ids of features to skip.
*/
drawReplaySkipping_(gl, context, skippedFeaturesHash) {
let i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
let i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;
featureIndex = this.startIndices.length - 2;
end = start = this.startIndices[featureIndex + 1];
for (i = this.styleIndices_.length - 1; i >= 0; --i) {
@@ -548,9 +548,8 @@ class WebGLLineStringReplay extends WebGLReplay {
this.startIndices[featureIndex] >= groupStart) {
featureStart = this.startIndices[featureIndex];
feature = this.startIndicesFeature[featureIndex];
featureUid = getUid(feature).toString();
if (skippedFeaturesHash[featureUid]) {
if (skippedFeaturesHash[getUid(feature)]) {
if (start !== end) {
this.drawElements(gl, context, start, end);
gl.clear(gl.DEPTH_BUFFER_BIT);
@@ -572,7 +571,7 @@ class WebGLLineStringReplay extends WebGLReplay {
* @inheritDoc
*/
drawHitDetectionReplayOneByOne(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {
let i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
let i, start, end, nextStyle, groupStart, feature, featureIndex;
featureIndex = this.startIndices.length - 2;
end = this.startIndices[featureIndex + 1];
for (i = this.styleIndices_.length - 1; i >= 0; --i) {
@@ -584,9 +583,8 @@ class WebGLLineStringReplay extends WebGLReplay {
this.startIndices[featureIndex] >= groupStart) {
start = this.startIndices[featureIndex];
feature = this.startIndicesFeature[featureIndex];
featureUid = getUid(feature).toString();
if (skippedFeaturesHash[featureUid] === undefined &&
if (skippedFeaturesHash[getUid(feature)] === undefined &&
feature.getGeometry() &&
(opt_hitExtent === undefined || intersects(
/** @type {Array<number>} */ (opt_hitExtent),