Skip to content

Commit

Permalink
Remove stop button in index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
CatMe0w committed Aug 11, 2024
1 parent ac4a354 commit 7c1577b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
19 changes: 1 addition & 18 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@
useIntegratedSearchBox="true"
></ferrostar-core>

<p class="controls" id="controls-start">
<p>
<span>
Search and select a destination, or
<button id="simulate">Simulate Navigation</button>
</span>
</p>

<p class="controls" id="controls-stop">
<button id="stop">Stop Navigation</button>
</p>

<script type="module">
import { SimulatedLocationProvider, BrowserLocationProvider } from "./src/location.ts";

Expand Down Expand Up @@ -86,19 +82,6 @@
// Start the navigation
core.locationProvider = locationProvider;
core.startNavigation(route, config);

// Hide the start button and show the stop button
document.getElementById("controls-start").style.display = "none";
document.getElementById("controls-stop").style.display = "block";
});

// Button to stop the navigation
document.getElementById("stop").addEventListener("click", () => {
core.stopNavigation();

// Hide the stop button and show the start button
document.getElementById("controls-start").style.display = "block";
document.getElementById("controls-stop").style.display = "none";
});
});
</script>
Expand Down
15 changes: 0 additions & 15 deletions web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,3 @@ ferrostar-core {
width: 100%;
display: block;
}

.controls {
display: flex;
width: 100%;
gap: 10px;
}

#controls-stop {
display: none;
}

#destination {
width: 100%;
max-width: 300px;
}

0 comments on commit 7c1577b

Please sign in to comment.