Skip to content

Commit c1abd8d

Browse files
committed
Website updates
1 parent 4ddceb5 commit c1abd8d

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/render/webgl/MixedGeometryBatch.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ declare class MixedGeometryBatch {
243243
* @param {string} featureUid the feature uid
244244
* @private
245245
*/
246-
private returnRef_;
246+
private removeRef_;
247247
/**
248248
* @param {Feature|RenderFeature} feature Feature
249249
*/

dist/en/main/ol/render/webgl/MixedGeometryBatch.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/render/webgl/MixedGeometryBatch.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ class MixedGeometryBatch {
508508
* @param {string} featureUid the feature uid
509509
* @private
510510
*/
511-
returnRef_(ref, featureUid) {
511+
removeRef_(ref, featureUid) {
512512
if (!ref) {
513513
throw new Error('This feature has no ref: ' + featureUid);
514514
}
@@ -541,7 +541,7 @@ class MixedGeometryBatch {
541541
entry = this.clearFeatureEntryInPolygonBatch_(feature) || entry;
542542
entry = this.clearFeatureEntryInLineStringBatch_(feature) || entry;
543543
if (entry) {
544-
this.returnRef_(entry.ref, getUid(entry.feature));
544+
this.removeRef_(entry.ref, getUid(entry.feature));
545545
}
546546
}
547547

@@ -582,11 +582,20 @@ class MixedGeometryBatch {
582582
*/
583583
filter(featureFilter) {
584584
const filtered = new MixedGeometryBatch();
585+
filtered.globalCounter_ = this.globalCounter_;
586+
filtered.uidToRef_ = this.uidToRef_;
587+
filtered.refToFeature_ = this.refToFeature_;
588+
let empty = true;
585589
for (const feature of this.refToFeature_.values()) {
586590
if (featureFilter(feature)) {
587591
filtered.addFeature(feature);
592+
empty = false;
588593
}
589594
}
595+
// no feature was added at all; simply return an empty batch for consistency downstream
596+
if (empty) {
597+
return new MixedGeometryBatch();
598+
}
590599
return filtered;
591600
}
592601
}

0 commit comments

Comments
 (0)