Don't put classes on body
parent
29dfb834de
commit
bf11924dfd
|
@ -298,7 +298,7 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) {
|
|||
this.rows[rowIdx].virtualSticky = true;
|
||||
|
||||
this.resetTouchParams();
|
||||
document.body.classList.add("vue-touching");
|
||||
globalThis.touchingPhoto = true;
|
||||
|
||||
this.touchAnchor = photo;
|
||||
this.prevOver = photo;
|
||||
|
@ -320,7 +320,7 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) {
|
|||
this.resetTouchParams();
|
||||
|
||||
window.setTimeout(() => {
|
||||
if (!this.touchAnchor) document.body.classList.remove("vue-touching");
|
||||
if (!this.touchAnchor) globalThis.touchingPhoto = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ export default class Photo extends Mixins(GlobalMixin) {
|
|||
|
||||
contextmenu(e: Event) {
|
||||
// user is trying to select the photo
|
||||
if (document.body.classList.contains("vue-touching")) {
|
||||
if (globalThis.touchingPhoto) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ $icon-size: $icon-half-size * 2;
|
|||
cursor: pointer;
|
||||
|
||||
display: none;
|
||||
body:not(.vue-touching) .p-outer:hover > & {
|
||||
.p-outer:hover > & {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ div.img-outer {
|
|||
|
||||
display: none;
|
||||
transition: border-radius 0.1s ease-in;
|
||||
body:not(.vue-touching) .p-outer:not(.selected):hover > & {
|
||||
.p-outer:not(.selected):hover > & {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,8 +39,11 @@ declare global {
|
|||
|
||||
var editDate: (photo: IPhoto) => void;
|
||||
var currentViewerPhoto: IPhoto;
|
||||
|
||||
var touchingPhoto: boolean;
|
||||
}
|
||||
globalThis.vuerouter = router;
|
||||
globalThis.touchingPhoto = false;
|
||||
|
||||
Vue.use(VueVirtualScroller);
|
||||
|
||||
|
|
Loading…
Reference in New Issue