From 5a4ba1b348d3e13b71e600022a1fbf88621de5d4 Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Fri, 2 Mar 2018 17:23:45 +0100 Subject: calculate the relative position where the event drops --- views/calendar/qml/View.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/views/calendar/qml/View.qml b/views/calendar/qml/View.qml index 213023b6..8eef3a92 100644 --- a/views/calendar/qml/View.qml +++ b/views/calendar/qml/View.qml @@ -249,9 +249,22 @@ FocusScope { eventDelegate.z = eventDelegate.z - 100 } + + onReleased: eventDelegate.Drag.drop() } } } + + DropArea { + anchors.fill: parent + + onDropped: { + console.log("DROP") + drop.accept(Qt.MoveAction) + drop.source.visible = false + console.log((drop.source.y - mainWeekViewer.y + mainWeekViewer.contentY) / Kube.Units.gridUnit) + } + } } } } -- cgit v1.2.3