diff --git a/ayanova/src/views/home-schedule.vue b/ayanova/src/views/home-schedule.vue index 309026e1..4ae8a48f 100644 --- a/ayanova/src/views/home-schedule.vue +++ b/ayanova/src/views/home-schedule.vue @@ -360,11 +360,10 @@ export default { }; }, methods: { - startDrag({ event, timed }) { + 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) { + + if (event && event.editable) { //My work around to disambiguate dragging and clicking clearTimeout(this.dragTimeout); this.dragged = false; @@ -379,19 +378,20 @@ export default { }, 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 - clearTimeout(this.dragTimeout); - this.dragged = false; - this.dragTimeout = setTimeout(() => { - this.dragged = true; - }, 100); // Minimal delay to be regarded as extend instead of click + if (event.editable) { + //My work around to disambiguate extending and clicking + clearTimeout(this.dragTimeout); + this.dragged = false; + this.dragTimeout = setTimeout(() => { + this.dragged = true; + }, 100); // Minimal delay to be regarded as extend instead of click - //this.dragEvent = event; - this.extendEvent = event; - this.createStart = event.start; - this.extendOriginal = event.end; + //this.dragEvent = event; + this.extendEvent = event; + this.createStart = event.start; + this.extendOriginal = event.end; + } }, async endDragExtend() { //On drag then dragEvent and dragTime are set