spacebar to return to start

master
Tomáš Mládek 2021-01-11 17:43:24 +01:00
parent 3e30ae81e0
commit 00b379500a
1 changed files with 6 additions and 7 deletions

View File

@ -147,6 +147,12 @@ export default defineComponent({
const start = processStart(svg);
if (start) {
panToElement(start, false);
window.addEventListener("keydown", (ev) => {
if (ev.key === " ") {
panToElement(start, true);
}
});
}
// Edge scrolling
@ -200,13 +206,6 @@ export default defineComponent({
// Audio areas
audioAreas.value = processAudio(svg);
// DEBUG
window.addEventListener("keydown", (ev) => {
if (ev.key === " ") {
panToAnchor.value(anchors.value[0]);
}
});
});
if (process.env.VUE_APP_DEMO) {