control panel ux
This commit is contained in:
parent
a1d80eb984
commit
7d01fce094
8 changed files with 219 additions and 60 deletions
|
|
@ -18,8 +18,6 @@
|
|||
let selectionToastId: string | null = null;
|
||||
let activeTab: 'control' | 'scenario' | 'settings' | 'about' = 'scenario';
|
||||
|
||||
let pointListModal: PointListModal | null = null;
|
||||
|
||||
onMount(() => {
|
||||
PredictionStore.subscribe((data) => {
|
||||
if (data) {
|
||||
|
|
@ -43,8 +41,8 @@
|
|||
console.log("Selection mode enabled");
|
||||
if (!selectionToastId) {
|
||||
selectionToastId = addToast({
|
||||
header: "Selection Mode",
|
||||
body: "Click on the map to select a position.",
|
||||
header: "Режим выбора координат",
|
||||
body: "Кликните на карту, чтобы выбрать координаты",
|
||||
color: "info",
|
||||
persistent: true,
|
||||
onRemoveCallback: () => {
|
||||
|
|
@ -67,13 +65,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function handleClickPointListModal() {
|
||||
if (map) {
|
||||
map.stopSelection();
|
||||
console.log("Selection mode disabled");
|
||||
}
|
||||
pointListModal?.openModal();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -95,7 +86,7 @@
|
|||
|
||||
<div>
|
||||
{#if activeTab === 'control'}
|
||||
<ControlPanel {handleClickSelectOnMap} {handleClickPointListModal} bind:this={controlPanel} />
|
||||
<ControlPanel {handleClickSelectOnMap} bind:this={controlPanel} />
|
||||
{:else if activeTab === 'scenario'}
|
||||
<ScenarioPanel />
|
||||
{:else if activeTab === 'settings'}
|
||||
|
|
@ -106,6 +97,5 @@
|
|||
</div>
|
||||
</PanelContainer>
|
||||
<ToastContainer />
|
||||
<PointListModal bind:this={pointListModal} />
|
||||
</Map>
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue