Styling: further style addNewPoint, misc style tweaks
This commit is contained in:
parent
83f3662b9a
commit
71abc8a1c4
6 changed files with 50 additions and 52 deletions
|
@ -635,7 +635,6 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
||||||
|
|
||||||
metacondition: {
|
metacondition: {
|
||||||
or: [
|
or: [
|
||||||
"__featureSwitchIsTesting=true",
|
|
||||||
"__featureSwitchIsDebugging=true",
|
"__featureSwitchIsDebugging=true",
|
||||||
"mapcomplete-show_tags=full",
|
"mapcomplete-show_tags=full",
|
||||||
"mapcomplete-show_debug=yes",
|
"mapcomplete-show_debug=yes",
|
||||||
|
|
|
@ -497,7 +497,6 @@ export default class ThemeViewState implements SpecialVisualizationState {
|
||||||
// ... search and select an element based on the hash
|
// ... search and select an element based on the hash
|
||||||
Hash.hash.mapD(
|
Hash.hash.mapD(
|
||||||
(hash) => {
|
(hash) => {
|
||||||
console.log("Searching for an id:", hash)
|
|
||||||
if (this.selectedElement.data?.properties?.id === hash) {
|
if (this.selectedElement.data?.properties?.id === hash) {
|
||||||
// We already have the correct hash
|
// We already have the correct hash
|
||||||
return
|
return
|
||||||
|
|
|
@ -65,7 +65,6 @@ class PointRenderingLayer {
|
||||||
if (marker === undefined) {
|
if (marker === undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("Marking", marker, "as selected for config", config)
|
|
||||||
marker?.classList?.add("selected")
|
marker?.classList?.add("selected")
|
||||||
this._markedAsSelected.push(marker)
|
this._markedAsSelected.push(marker)
|
||||||
})
|
})
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
import {onDestroy} from "svelte";
|
import {onDestroy} from "svelte";
|
||||||
import NextButton from "../../Base/NextButton.svelte";
|
import NextButton from "../../Base/NextButton.svelte";
|
||||||
import BackButton from "../../Base/BackButton.svelte";
|
import BackButton from "../../Base/BackButton.svelte";
|
||||||
|
import ToSvelte from "../../Base/ToSvelte.svelte";
|
||||||
|
import Svg from "../../../Svg";
|
||||||
|
|
||||||
export let coordinate: { lon: number, lat: number };
|
export let coordinate: { lon: number, lat: number };
|
||||||
export let state: SpecialVisualizationState;
|
export let state: SpecialVisualizationState;
|
||||||
|
@ -167,20 +169,19 @@
|
||||||
}/>
|
}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SubtleButton on:click={() => {
|
<div class="flex flex-wrap-reverse md:flex-nowrap">
|
||||||
layerIsDisplayed.setData(true)
|
|
||||||
abort()
|
|
||||||
}}>
|
|
||||||
<EyeIcon slot="image" class="w-8"/>
|
|
||||||
<Tr slot="message" t={Translations.t.general.add.enableLayer.Subs({name: selectedPreset.layer.name})}/>
|
|
||||||
</SubtleButton>
|
|
||||||
|
|
||||||
<SubtleButton on:click={() => {
|
<button class="flex w-full gap-x-1"
|
||||||
abort()
|
on:click={() => {abort();state.guistate.openFilterView(selectedPreset.layer)}}>
|
||||||
state.guistate.openFilterView(selectedPreset.layer) } }>
|
<ToSvelte construct={Svg.layers_svg().SetClass("w-12")}/>
|
||||||
<img src="./assets/svg/layers.svg" slot="image" class="w-6">
|
<Tr t={Translations.t.general.add.openLayerControl}/>
|
||||||
<Tr slot="message" t={Translations.t.general.add.openLayerControl}></Tr>
|
</button>
|
||||||
</SubtleButton>
|
|
||||||
|
<button class="flex w-full gap-x-1 primary" on:click={() => {layerIsDisplayed.setData(true);abort()}}>
|
||||||
|
<EyeIcon class="w-12"/>
|
||||||
|
<Tr t={Translations.t.general.add.enableLayer.Subs({name: selectedPreset.layer.name})}/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{:else if $layerHasFilters}
|
{:else if $layerHasFilters}
|
||||||
|
@ -189,26 +190,17 @@
|
||||||
<EyeOffIcon class="w-8"/>
|
<EyeOffIcon class="w-8"/>
|
||||||
<Tr t={Translations.t.general.add.disableFiltersExplanation}/>
|
<Tr t={Translations.t.general.add.disableFiltersExplanation}/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-wrap-reverse md:flex-nowrap">
|
||||||
<SubtleButton on:click={() => {
|
<button class="flex w-full gap-x-1 primary"
|
||||||
abort()
|
on:click={() => {abort(); state.layerState.filteredLayers.get(selectedPreset.layer.id).disableAllFilters()} }>
|
||||||
const flayer = state.layerState.filteredLayers.get(selectedPreset.layer.id)
|
<EyeOffIcon class="w-12"/>
|
||||||
flayer.disableAllFilters()
|
<Tr t={Translations.t.general.add.disableFilters}/>
|
||||||
}
|
</button>
|
||||||
}>
|
<button class="flex w-full gap-x-1" on:click={() => {abort();state.guistate.openFilterView(selectedPreset.layer)}}>
|
||||||
<EyeOffIcon class="w-8"/>
|
<ToSvelte construct={Svg.layers_svg().SetClass("w-12")}/>
|
||||||
<Tr slot="message" t={Translations.t.general.add.disableFilters}></Tr>
|
<Tr t={Translations.t.general.add.openLayerControl}/>
|
||||||
</SubtleButton>
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<SubtleButton options={{extraClasses:"secondary"}} on:click={() => {
|
|
||||||
abort()
|
|
||||||
state.guistate.openFilterView(selectedPreset.layer)
|
|
||||||
}
|
|
||||||
}>
|
|
||||||
<img src="./assets/svg/layers.svg" slot="image" class="w-6">
|
|
||||||
<Tr slot="message" t={Translations.t.general.add.openLayerControl}></Tr>
|
|
||||||
</SubtleButton>
|
|
||||||
|
|
||||||
{:else if !confirmedCategory }
|
{:else if !confirmedCategory }
|
||||||
<!-- Second, confirm the category -->
|
<!-- Second, confirm the category -->
|
||||||
|
@ -240,7 +232,7 @@
|
||||||
<TagHint embedIn={tags => t.presetInfo.Subs({tags})} {state}
|
<TagHint embedIn={tags => t.presetInfo.Subs({tags})} {state}
|
||||||
tags={new And(selectedPreset.preset.tags)}></TagHint>
|
tags={new And(selectedPreset.preset.tags)}></TagHint>
|
||||||
|
|
||||||
<div class="flex w-full">
|
<div class="flex w-full flex-wrap-reverse md:flex-nowrap">
|
||||||
|
|
||||||
<BackButton on:click={() => selectedPreset = undefined} clss="w-full">
|
<BackButton on:click={() => selectedPreset = undefined} clss="w-full">
|
||||||
<Tr slot="message" t={t.backToSelect}/>
|
<Tr slot="message" t={t.backToSelect}/>
|
||||||
|
@ -272,8 +264,8 @@
|
||||||
{:else if !creating}
|
{:else if !creating}
|
||||||
<NewPointLocationInput value={preciseCoordinate} snappedTo={snappedToObject} {state} {coordinate}
|
<NewPointLocationInput value={preciseCoordinate} snappedTo={snappedToObject} {state} {coordinate}
|
||||||
targetLayer={selectedPreset.layer}
|
targetLayer={selectedPreset.layer}
|
||||||
snapToLayers={selectedPreset.preset.preciseInput.snapToLayers}></NewPointLocationInput>
|
snapToLayers={selectedPreset.preset.preciseInput.snapToLayers}/>
|
||||||
<div class="flex">
|
<div class="flex flex-wrap-reverse md:flex-nowrap">
|
||||||
|
|
||||||
<BackButton on:click={() => selectedPreset = undefined} clss="w-full">
|
<BackButton on:click={() => selectedPreset = undefined} clss="w-full">
|
||||||
<Tr slot="message" t={t.backToSelect}/>
|
<Tr slot="message" t={t.backToSelect}/>
|
||||||
|
|
|
@ -124,8 +124,8 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if skipped > 0 }
|
{#if skipped > 0 }
|
||||||
<button on:click={() => {skippedQuestions.setData(new Set()); skipped=0}}>
|
<button class="w-full" on:click={() => {skippedQuestions.setData(new Set()); skipped=0}}>
|
||||||
Re-activate skipped questions
|
<Tr t={Translations.t.general.questionBox.reactivate }/>
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1304,6 +1304,11 @@ video {
|
||||||
row-gap: 0.5rem;
|
row-gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gap-x-1 {
|
||||||
|
-webkit-column-gap: 0.25rem;
|
||||||
|
column-gap: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.self-start {
|
.self-start {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
}
|
}
|
||||||
|
@ -2543,6 +2548,10 @@ a.link-underline {
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.md\:flex-nowrap {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.md\:border-t-2 {
|
.md\:border-t-2 {
|
||||||
border-top-width: 2px;
|
border-top-width: 2px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue