From 94ac95c746dfc22188eb3db54229c1b2155e9042 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 4 Oct 2021 21:04:32 +0000 Subject: [PATCH] --- ayanova/src/views/home-schedule.vue | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ayanova/src/views/home-schedule.vue b/ayanova/src/views/home-schedule.vue index 9d41adcd..48758b6d 100644 --- a/ayanova/src/views/home-schedule.vue +++ b/ayanova/src/views/home-schedule.vue @@ -539,7 +539,6 @@ export default { } }, async endDragExtend() { - console.log("endDragExtend fired"); //On drag then dragged is set to true and dragEvent and dragTime are set //on extend then dragged is set to true extendEvent (actual event), extendOriginal and createStart are set, dragEvent is null //on create then dragged is set to false and createStart is only value set, dragEvent is null and extendEvent is null @@ -625,13 +624,13 @@ export default { }, startDrag({ event }) { //# mouse down on an event triggers this call - console.log("StartDrag, event:", JSON.stringify(event)); + //console.log("StartDrag, event:", JSON.stringify(event)); if (event) { if (event.editable) { this.lastMouseDownMS = new Date().getTime(); //My work around to disambiguate dragging and clicking //clearTimeout(this.dragTimeout); - console.log("startDrag in editable set dragged false"); + // console.log("startDrag in editable set dragged false"); this.dragged = false; // this.dragTimeout = setTimeout(() => { // this.dragged = true; @@ -652,7 +651,15 @@ export default { itWasAClickNotADrag() { if (this.lastMouseDownMS == null) { //return; - throw new Error("lastMouseMS is null!"); + if (this.$ay.dev) { + throw new Error("lastMouseDownMS is null!"); + } else { + window.$gz.store.commit( + "logItem", + "home-schedule:lastMouseDownMS is unexpectedly null" + ); + return true; //least dangerous option in production + } } const elapsed = new Date().getTime() - this.lastMouseDownMS; this.lastMouseDownMS = null; @@ -805,12 +812,12 @@ export default { }); }, async showMoreInfo(event) { - console.log("showMoreInfo click event fired"); + console.log("showMoreInfo, event is", event); //workaround to disambiguate drag click from view more info click - if (this.dragged) { - return; - } - console.log("showMoreINfo not dragged, popping up"); + // if (this.dragged) { + // return; + // } + // console.log("showMoreINfo not dragged, popping up"); let route = null; this.evInfo = {}; switch (event.type) {