Commit c0f88567 authored by Andras Mantia's avatar Andras Mantia

Avoid jumping of items toward right/botton when dropping

Reviewers: #plasma, hein, mwolff

Reviewed By: mwolff

Differential Revision: https://phabricator.kde.org/D8922
parent 98d56d91
......@@ -1100,6 +1100,11 @@ Item {
var from = -1;
var to = -1;
// round the drop pos to half of an item's size to have a more exact
// placement in the grid and avoid jumping items
dropPos.x = Math.floor((2 * dropPos.x) / cellWidth) * (cellWidth / 2);
dropPos.y = Math.floor((2 * dropPos.y) / cellHeight) * (cellHeight / 2);
for (var i = 0; i < urls.length; i++) {
from = positioner.indexForUrl(urls[i]);
to = -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment