Fix bug: fallthrough layers let their features pass again, fixes #349
This commit is contained in:
parent
061abd4a76
commit
3d40378628
3 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ export default class FeatureSourceMerger implements FeatureSource {
|
||||||
// We seed the dictionary with the previously loaded features
|
// We seed the dictionary with the previously loaded features
|
||||||
const oldValues = this.features.data ?? [];
|
const oldValues = this.features.data ?? [];
|
||||||
for (const oldValue of oldValues) {
|
for (const oldValue of oldValues) {
|
||||||
all.set(oldValue.feature.id, oldValue)
|
all.set(oldValue.feature.id + oldValue.feature._matching_layer_id, oldValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const source of this._sources) {
|
for (const source of this._sources) {
|
||||||
|
@ -35,7 +35,7 @@ export default class FeatureSourceMerger implements FeatureSource {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (const f of source.features.data) {
|
for (const f of source.features.data) {
|
||||||
const id = f.feature.properties.id;
|
const id = f.feature.properties.id + f.feature._matching_layer_id;
|
||||||
if (!all.has(id)) {
|
if (!all.has(id)) {
|
||||||
// This is a new feature
|
// This is a new feature
|
||||||
somethingChanged = true;
|
somethingChanged = true;
|
||||||
|
|
|
@ -20,9 +20,9 @@ export default class RememberingSource implements FeatureSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then new ids
|
// Then new ids
|
||||||
const ids = new Set<string>(features.map(f => f.feature.properties.id + f.feature.geometry.type));
|
const ids = new Set<string>(features.map(f => f.feature.properties.id + f.feature.geometry.type + f.feature._matching_layer_id));
|
||||||
// the old data
|
// the old data
|
||||||
const oldData = oldFeatures.filter(old => !ids.has(old.feature.properties.id + old.feature.geometry.type))
|
const oldData = oldFeatures.filter(old => !ids.has(old.feature.properties.id + old.feature.geometry.type + old.feature._matching_layer_id))
|
||||||
return [...features, ...oldData];
|
return [...features, ...oldData];
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Utils } from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
export default class Constants {
|
||||||
|
|
||||||
public static vNumber = "0.7.5a";
|
public static vNumber = "0.7.5b";
|
||||||
|
|
||||||
// The user journey states thresholds when a new feature gets unlocked
|
// The user journey states thresholds when a new feature gets unlocked
|
||||||
public static userJourney = {
|
public static userJourney = {
|
||||||
|
|
Loading…
Reference in a new issue