spacebar to return to start

This commit is contained in:
Tomáš Mládek 2021-01-11 17:43:24 +01:00
parent 3e30ae81e0
commit 00b379500a

View file

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