-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear state when switching areas in the web apps
- Loading branch information
1 parent
14e7c70
commit 37ce811
Showing
4 changed files
with
26 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
import type { FeatureCollection } from "geojson"; | ||
import { writable, type Writable } from "svelte/store"; | ||
import { emptyGeojson } from "../common/utils"; | ||
import { network } from "../common"; | ||
|
||
export const blockGj: Writable<FeatureCollection> = writable(emptyGeojson()); | ||
|
||
// TODO Need to unsubscribe | ||
// Unset when the network changes | ||
network.subscribe((value) => { | ||
blockGj.set(emptyGeojson()); | ||
}); |