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