This commit is contained in:
@@ -318,8 +318,6 @@ export default {
|
|||||||
createEvent: null,
|
createEvent: null,
|
||||||
createStart: null,
|
createStart: null,
|
||||||
extendOriginal: null,
|
extendOriginal: null,
|
||||||
dragging: false,
|
|
||||||
showMoreInfoRequested: false,
|
|
||||||
dragged: false,
|
dragged: false,
|
||||||
dragTimeout: null,
|
dragTimeout: null,
|
||||||
formState: {
|
formState: {
|
||||||
@@ -344,14 +342,13 @@ export default {
|
|||||||
startDrag({ event, timed }) {
|
startDrag({ event, timed }) {
|
||||||
console.log("startDrag");
|
console.log("startDrag");
|
||||||
if (event && timed) {
|
if (event && timed) {
|
||||||
|
//My work around to disambiguate dragging and clicking
|
||||||
clearTimeout(this.dragTimeout);
|
clearTimeout(this.dragTimeout);
|
||||||
|
|
||||||
this.dragged = false;
|
this.dragged = false;
|
||||||
this.dragTimeout = setTimeout(() => {
|
this.dragTimeout = setTimeout(() => {
|
||||||
this.dragged = true;
|
this.dragged = true;
|
||||||
}, 100); // Minimal delay to be regarded as drag instead of click
|
}, 100); // Minimal delay to be regarded as drag instead of click
|
||||||
|
|
||||||
//console.log("if passed true");
|
|
||||||
this.dragEvent = event;
|
this.dragEvent = event;
|
||||||
this.dragTime = null;
|
this.dragTime = null;
|
||||||
this.extendOriginal = null;
|
this.extendOriginal = null;
|
||||||
@@ -396,7 +393,6 @@ export default {
|
|||||||
//console.log("mouseMove got time:", mouse);
|
//console.log("mouseMove got time:", mouse);
|
||||||
|
|
||||||
if (this.dragEvent && this.dragTime !== null) {
|
if (this.dragEvent && this.dragTime !== null) {
|
||||||
this.dragging = true;
|
|
||||||
// console.log("mosueMove:A", {
|
// console.log("mosueMove:A", {
|
||||||
// dragEvent: this.dragEvent,
|
// dragEvent: this.dragEvent,
|
||||||
// dragTime: this.dragTime
|
// dragTime: this.dragTime
|
||||||
@@ -424,14 +420,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
endDrag() {
|
endDrag() {
|
||||||
// console.log("endDrag, dragging: ", this.dragging);
|
// console.log("endDrag");
|
||||||
if (!this.dragging) {
|
|
||||||
//it's a click to open an event for more info
|
|
||||||
console.log("EndDrag - moreinfo event:", this.dragEvent);
|
|
||||||
} else {
|
|
||||||
this.dragging = false;
|
|
||||||
this.showMoreInfoRequested = true;
|
|
||||||
}
|
|
||||||
this.dragTime = null;
|
this.dragTime = null;
|
||||||
this.dragEvent = null;
|
this.dragEvent = null;
|
||||||
this.createEvent = null;
|
this.createEvent = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user