Fix touching selection tick (again)
parent
dbb5e479a0
commit
ab505900a2
|
@ -298,7 +298,6 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) {
|
||||||
this.rows[rowIdx].virtualSticky = true;
|
this.rows[rowIdx].virtualSticky = true;
|
||||||
|
|
||||||
this.resetTouchParams();
|
this.resetTouchParams();
|
||||||
globalThis.touchingPhoto = true;
|
|
||||||
|
|
||||||
this.touchAnchor = photo;
|
this.touchAnchor = photo;
|
||||||
this.prevOver = photo;
|
this.prevOver = photo;
|
||||||
|
@ -318,10 +317,6 @@ export default class SelectionManager extends Mixins(GlobalMixin, UserConfig) {
|
||||||
|
|
||||||
if (this.touchTimer) this.clickPhoto(photo, {} as any, rowIdx);
|
if (this.touchTimer) this.clickPhoto(photo, {} as any, rowIdx);
|
||||||
this.resetTouchParams();
|
this.resetTouchParams();
|
||||||
|
|
||||||
window.setTimeout(() => {
|
|
||||||
if (!this.touchAnchor) globalThis.touchingPhoto = false;
|
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetTouchParams() {
|
private resetTouchParams() {
|
||||||
|
|
|
@ -231,11 +231,8 @@ export default class Photo extends Mixins(GlobalMixin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
contextmenu(e: Event) {
|
contextmenu(e: Event) {
|
||||||
// user is trying to select the photo
|
e.preventDefault();
|
||||||
if (globalThis.touchingPhoto) {
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Start preview video */
|
/** Start preview video */
|
||||||
|
@ -298,8 +295,10 @@ $icon-size: $icon-half-size * 2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
.p-outer:hover > & {
|
@media (hover: hover) {
|
||||||
display: flex;
|
.p-outer:hover > & {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
@ -411,8 +410,10 @@ div.img-outer {
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
transition: border-radius 0.1s ease-in;
|
transition: border-radius 0.1s ease-in;
|
||||||
.p-outer:not(.selected):hover > & {
|
@media (hover: hover) {
|
||||||
display: block;
|
.p-outer:not(.selected):hover > & {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,14 +40,12 @@ declare global {
|
||||||
var editDate: (photo: IPhoto) => void;
|
var editDate: (photo: IPhoto) => void;
|
||||||
var currentViewerPhoto: IPhoto;
|
var currentViewerPhoto: IPhoto;
|
||||||
|
|
||||||
var touchingPhoto: boolean;
|
|
||||||
var windowInnerWidth: number; // cache
|
var windowInnerWidth: number; // cache
|
||||||
var windowInnerHeight: number; // cache
|
var windowInnerHeight: number; // cache
|
||||||
}
|
}
|
||||||
|
|
||||||
globalThis.vuerouter = router;
|
globalThis.vuerouter = router;
|
||||||
|
|
||||||
globalThis.touchingPhoto = false;
|
|
||||||
globalThis.windowInnerWidth = window.innerWidth;
|
globalThis.windowInnerWidth = window.innerWidth;
|
||||||
globalThis.windowInnerHeight = window.innerHeight;
|
globalThis.windowInnerHeight = window.innerHeight;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue