This commit is contained in:
2021-09-19 19:32:33 +00:00
parent 6c0984825c
commit 790a1b316d

View File

@@ -360,11 +360,10 @@ export default {
}; };
}, },
methods: { methods: {
startDrag({ event, timed }) { startDrag({ event }) {
// console.log("startDrag", event); // console.log("startDrag", event);
//TODO: IF event is not editable then just return here to prevent the drag
//if (event && timed) { if (event && event.editable) {
if (event) {
//My work around to disambiguate dragging and clicking //My work around to disambiguate dragging and clicking
clearTimeout(this.dragTimeout); clearTimeout(this.dragTimeout);
this.dragged = false; this.dragged = false;
@@ -379,19 +378,20 @@ export default {
}, },
extendBottom(event) { extendBottom(event) {
// console.log("extendBottom", event); // console.log("extendBottom", event);
//TODO: if event is not editable then just return here to prevent extend
//My work around to disambiguate extending and clicking if (event.editable) {
clearTimeout(this.dragTimeout); //My work around to disambiguate extending and clicking
this.dragged = false; clearTimeout(this.dragTimeout);
this.dragTimeout = setTimeout(() => { this.dragged = false;
this.dragged = true; this.dragTimeout = setTimeout(() => {
}, 100); // Minimal delay to be regarded as extend instead of click this.dragged = true;
}, 100); // Minimal delay to be regarded as extend instead of click
//this.dragEvent = event; //this.dragEvent = event;
this.extendEvent = event; this.extendEvent = event;
this.createStart = event.start; this.createStart = event.start;
this.extendOriginal = event.end; this.extendOriginal = event.end;
}
}, },
async endDragExtend() { async endDragExtend() {
//On drag then dragEvent and dragTime are set //On drag then dragEvent and dragTime are set