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