forked from MapComplete/MapComplete
Stabilize personal theme, textfield now correctly appears if it is an option in the freeform too
This commit is contained in:
parent
79fc3f54e5
commit
416a76ae4f
22 changed files with 278 additions and 149 deletions
|
@ -6,29 +6,26 @@ import {GeoOperations} from "../GeoOperations";
|
|||
export default class WayHandlingApplyingFeatureSource implements FeatureSource {
|
||||
features: UIEventSource<{ feature: any; freshness: Date }[]>;
|
||||
|
||||
constructor(layers: {
|
||||
constructor(layers: UIEventSource<{
|
||||
layerDef: LayerConfig
|
||||
}[],
|
||||
}[]>,
|
||||
upstream: FeatureSource) {
|
||||
const layerDict = {};
|
||||
let allDefaultWayHandling = true;
|
||||
for (const layer of layers) {
|
||||
layerDict[layer.layerDef.id] = layer;
|
||||
if (layer.layerDef.wayHandling !== LayerConfig.WAYHANDLING_DEFAULT) {
|
||||
allDefaultWayHandling = false;
|
||||
}
|
||||
}
|
||||
if (allDefaultWayHandling) {
|
||||
this.features = upstream.features;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.features = upstream.features.map(
|
||||
features => {
|
||||
if(features === undefined){
|
||||
return;
|
||||
}
|
||||
|
||||
const layerDict = {};
|
||||
let allDefaultWayHandling = true;
|
||||
for (const layer of layers.data) {
|
||||
layerDict[layer.layerDef.id] = layer;
|
||||
if (layer.layerDef.wayHandling !== LayerConfig.WAYHANDLING_DEFAULT) {
|
||||
allDefaultWayHandling = false;
|
||||
}
|
||||
}
|
||||
|
||||
const newFeatures: { feature: any, freshness: Date }[] = [];
|
||||
for (const f of features) {
|
||||
const feat = f.feature;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue