This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user