summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2018-03-02 17:23:45 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2018-03-02 17:23:45 +0100
commit5a4ba1b348d3e13b71e600022a1fbf88621de5d4 (patch)
treee7c5cd2da72a8d04566855329f0c8341d8fb1c5d
parentc7ace5e407e71d781adcbb884b375c273eab3bec (diff)
downloadkube-5a4ba1b348d3e13b71e600022a1fbf88621de5d4.tar.gz
kube-5a4ba1b348d3e13b71e600022a1fbf88621de5d4.zip
calculate the relative position where the event drops
-rw-r--r--views/calendar/qml/View.qml13
1 files changed, 13 insertions, 0 deletions
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 {
249 eventDelegate.z = eventDelegate.z - 100 249 eventDelegate.z = eventDelegate.z - 100
250 250
251 } 251 }
252
253 onReleased: eventDelegate.Drag.drop()
252 } 254 }
253 } 255 }
254 } 256 }
257
258 DropArea {
259 anchors.fill: parent
260
261 onDropped: {
262 console.log("DROP")
263 drop.accept(Qt.MoveAction)
264 drop.source.visible = false
265 console.log((drop.source.y - mainWeekViewer.y + mainWeekViewer.contentY) / Kube.Units.gridUnit)
266 }
267 }
255 } 268 }
256 } 269 }
257 } 270 }