Merge branch 'master' into develop
This commit is contained in:
commit
e797e1dcbc
12 changed files with 170 additions and 254 deletions
|
@ -68,7 +68,7 @@ export abstract class Validator {
|
|||
}
|
||||
|
||||
public getPlaceholder() {
|
||||
return Translations.t.validation[this.name].description
|
||||
return Translations.t.validation[this.name]?.description
|
||||
}
|
||||
|
||||
public isValid(_: string, getCountry?: () => string): boolean {
|
||||
|
|
|
@ -18,7 +18,7 @@ import Filterview from "./BigComponents/Filterview.svelte"
|
|||
import FilteredLayer from "../Models/FilteredLayer"
|
||||
import { SubtleButton } from "./Base/SubtleButton"
|
||||
import { GeoOperations } from "../Logic/GeoOperations"
|
||||
import { Polygon } from "geojson"
|
||||
import { FeatureCollection, Polygon } from "geojson"
|
||||
import { Feature } from "geojson"
|
||||
|
||||
class StatsticsForOverviewFile extends Combine {
|
||||
|
@ -30,7 +30,9 @@ class StatsticsForOverviewFile extends Combine {
|
|||
new Title("Filters"),
|
||||
new SvelteUIElement(Filterview, { filteredLayer }),
|
||||
])
|
||||
|
||||
filteredLayer.currentFilter.addCallbackAndRun(tf => {
|
||||
console.log("Filters are", tf)
|
||||
})
|
||||
const downloaded = new UIEventSource<{ features: ChangeSetData[] }[]>([])
|
||||
|
||||
for (const filepath of paths) {
|
||||
|
|
|
@ -39,16 +39,20 @@
|
|||
}
|
||||
|
||||
function fusePath(subpartPath: string[]): (string | number)[] {
|
||||
const newPath = [...path]
|
||||
const toAdd = [...subpartPath]
|
||||
for (const part of path) {
|
||||
if (toAdd[0] === part) {
|
||||
toAdd.splice(0, 1)
|
||||
} else {
|
||||
break
|
||||
const newPath = [...path] // has indices, e.g. ["A", 1, "B", "C", 2]
|
||||
const toAdd = [...subpartPath] // doesn't have indices, e.g. ["A", "B", "C", "D"]
|
||||
|
||||
let indexInToAdd = 0
|
||||
for (let i = 0; i < newPath.length; i++) {
|
||||
if(newPath[i] === toAdd[indexInToAdd]){
|
||||
indexInToAdd ++
|
||||
}
|
||||
}
|
||||
newPath.push(...toAdd)
|
||||
|
||||
// indexToAdd should now point to the last common index, '2' in the example
|
||||
const resting = toAdd.slice(indexInToAdd)
|
||||
|
||||
newPath.push(...resting)
|
||||
return newPath
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ export abstract class EditJsonState<T> {
|
|||
|
||||
for (let i = 0; i < path.length - 1; i++) {
|
||||
const breadcrumb = path[i]
|
||||
if (entry[breadcrumb] === undefined) {
|
||||
if (entry[breadcrumb] === undefined || entry[breadcrumb] === null) {
|
||||
if (isUndefined) {
|
||||
// we have a dead end _and_ we do not need to set a value - we do an early return
|
||||
return
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
</div>
|
||||
{/each}
|
||||
{:else}
|
||||
<Accordion>
|
||||
<Accordion> <!-- The CollapsedTagRenderingPreview contains the accordeon items -->
|
||||
{#each $currentValue as value, i}
|
||||
<CollapsedTagRenderingPreview
|
||||
{state}
|
||||
|
|
|
@ -107,6 +107,7 @@
|
|||
placeholder="The key of the tag"
|
||||
type="key"
|
||||
value={keyValue}
|
||||
autofocus
|
||||
on:submit
|
||||
/>
|
||||
<select
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue