mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
Fix some errors in keyboard handler
This commit is contained in:
parent
a10d6952ba
commit
9b81856353
2
sist2-vue/dist/js/index.js
vendored
2
sist2-vue/dist/js/index.js
vendored
File diff suppressed because one or more lines are too long
@ -89,7 +89,6 @@ export default {
|
|||||||
|
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
case " ": {
|
case " ": {
|
||||||
console.log("SPACE")
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
@ -98,16 +97,12 @@ export default {
|
|||||||
[...document.getElementsByClassName("fslightbox-absoluted")].forEach(elem => {
|
[...document.getElementsByClassName("fslightbox-absoluted")].forEach(elem => {
|
||||||
if (elem.style.transform === "translate(0px)" || elem.style.transform === "translate(0px, 0px)") {
|
if (elem.style.transform === "translate(0px)" || elem.style.transform === "translate(0px, 0px)") {
|
||||||
const vid = elem.getElementsByTagName("video")[0];
|
const vid = elem.getElementsByTagName("video")[0];
|
||||||
console.log(elem)
|
|
||||||
console.log(vid)
|
|
||||||
|
|
||||||
if (vid) {
|
if (vid) {
|
||||||
if (vid.paused) {
|
if (vid.paused) {
|
||||||
vid.play();
|
vid.play();
|
||||||
console.log("PLAY")
|
|
||||||
} else {
|
} else {
|
||||||
vid.pause()
|
vid.pause()
|
||||||
console.log("PAUSE")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -119,24 +114,28 @@ export default {
|
|||||||
}
|
}
|
||||||
case "ArrowUp":
|
case "ArrowUp":
|
||||||
case "k": {
|
case "k": {
|
||||||
if (!lightboxStore.data.isThumbing) {
|
if (!lightboxStore.data.isThumbing && lightboxStore.core.thumbsToggler) {
|
||||||
lightboxStore.core.thumbsToggler.toggleThumbs();
|
lightboxStore.core.thumbsToggler.toggleThumbs();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case "ArrowDown":
|
case "ArrowDown":
|
||||||
case "j": {
|
case "j": {
|
||||||
if (lightboxStore.data.isThumbing) {
|
if (lightboxStore.data.isThumbing && lightboxStore.core.thumbsToggler) {
|
||||||
lightboxStore.core.thumbsToggler.toggleThumbs();
|
lightboxStore.core.thumbsToggler.toggleThumbs();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case "h": {
|
case "h": {
|
||||||
|
if (lightboxStore.core.stageManager.getPreviousSlideIndex) {
|
||||||
lightboxStore.core.slideIndexChanger.jumpTo(lightboxStore.core.stageManager.getPreviousSlideIndex());
|
lightboxStore.core.slideIndexChanger.jumpTo(lightboxStore.core.stageManager.getPreviousSlideIndex());
|
||||||
break;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case "l": {
|
case "l": {
|
||||||
|
if (lightboxStore.core.stageManager.getNextSlideIndex) {
|
||||||
lightboxStore.core.slideIndexChanger.jumpTo(lightboxStore.core.stageManager.getNextSlideIndex());
|
lightboxStore.core.slideIndexChanger.jumpTo(lightboxStore.core.stageManager.getNextSlideIndex());
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
src/web/static_generated.c
vendored
2
src/web/static_generated.c
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user