From fce2290f0ec08ae7168061380050cd4fb81133b6 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 19 Sep 2021 20:07:43 +0000 Subject: [PATCH] --- ayanova/src/views/home-schedule.vue | 42 ++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/ayanova/src/views/home-schedule.vue b/ayanova/src/views/home-schedule.vue index 4ae8a48f..55b17b2c 100644 --- a/ayanova/src/views/home-schedule.vue +++ b/ayanova/src/views/home-schedule.vue @@ -84,7 +84,18 @@ {{ iconForEvent(event.type) }} - + + + $ayiLock
{ - this.dragged = true; - }, 100); // Minimal delay to be regarded as drag instead of click + if (event) { + if (event.editable) { + //My work around to disambiguate dragging and clicking + clearTimeout(this.dragTimeout); + this.dragged = false; + this.dragTimeout = setTimeout(() => { + this.dragged = true; + }, 100); // Minimal delay to be regarded as drag instead of click - this.dragEvent = event; - this.dragTime = null; - this.extendOriginal = null; + this.dragEvent = event; + this.dragTime = null; + this.extendOriginal = null; + } else { + this.dragged = false; + } } }, extendBottom(event) { @@ -645,7 +660,10 @@ export default { }); }, async showevInfo({ nativeEvent, event }) { - //console.log("showevInfo, dragged: ", this.dragged); + console.log("showevInfo, event: ", { + event: event, + dragged: this.dragged + }); //workaround to disambiguate drag click from view more info click if (this.dragged) { return;