-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start the skeleton route mode, but actually, just do some refactoring
first
- Loading branch information
1 parent
48a0f4b
commit ae32dac
Showing
8 changed files
with
109 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script lang="ts"> | ||
import type { FeatureCollection } from "geojson"; | ||
import { onDestroy, onMount } from "svelte"; | ||
import { GeoJSON, LineLayer } from "svelte-maplibre"; | ||
import RenderNeighbourhood from "./RenderNeighbourhood.svelte"; | ||
import SplitComponent from "./SplitComponent.svelte"; | ||
import { app, map, mode } from "./stores"; | ||
onMount(() => { | ||
$map?.keyboard.disable(); | ||
}); | ||
onDestroy(() => { | ||
$map?.keyboard.enable(); | ||
}); | ||
function onKeyDown(e: KeyboardEvent) { | ||
if (e.key == "Escape") { | ||
e.stopPropagation(); | ||
back(); | ||
} | ||
} | ||
function back() { | ||
$mode = { mode: "neighbourhood" }; | ||
} | ||
</script> | ||
|
||
<svelte:window on:keydown={onKeyDown} /> | ||
|
||
<SplitComponent> | ||
<div slot="sidebar"> | ||
<div><button on:click={back}>Back to editing</button></div> | ||
|
||
<p>Drag markers for a route</p> | ||
</div> | ||
|
||
<div slot="map"> | ||
<RenderNeighbourhood | ||
gjInput={JSON.parse($app.renderNeighbourhood())} | ||
interactive={false} | ||
/> | ||
</div> | ||
</SplitComponent> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters