feat: update surface URL when changing axes
parent
4c1231a4ba
commit
7993e94ce5
|
@ -9,14 +9,17 @@
|
|||
import BlobPreview from "../components/display/BlobPreview.svelte";
|
||||
import { i18n } from "../i18n";
|
||||
import type { IValue } from "upend/types";
|
||||
import { useNavigate } from "svelte-navigator";
|
||||
const navigate = useNavigate();
|
||||
|
||||
const urlSearch = window.location.href.substring(
|
||||
window.location.href.indexOf("?")
|
||||
const urlParams = new URLSearchParams(
|
||||
window.location.href.substring(window.location.href.indexOf("?"))
|
||||
);
|
||||
const urlParams = new URLSearchParams(urlSearch);
|
||||
|
||||
export let x: string = urlParams.get("x");
|
||||
export let y: string = urlParams.get("y");
|
||||
$: if (x && y) navigate(`/surface?x=${x}&y=${y}`, { replace: true });
|
||||
|
||||
let viewMode = "link";
|
||||
|
||||
let currentX = NaN;
|
||||
|
|
Loading…
Reference in New Issue