lsp: Fix calculation of drop coordinates over the preview area

This commit is contained in:
Tobias Hunger 2024-01-25 19:56:16 +01:00 committed by Tobias Hunger
parent 91e4a1bfa7
commit c29314b2a8

View file

@ -67,7 +67,7 @@ export component ComponentList {
moved() => {
if (drop-x >= preview-area-position-x && drop-x <= preview-area-position-x + preview-area-width &&
drop-y >= preview-area-position-y && drop-y <= preview-area-position-y + preview-area-height) {
self.can-drop-here = root.can-drop(ci.name, drop-x, drop-y);
self.can-drop-here = root.can-drop(ci.name, drop-x - preview-area-position-x, drop-y - preview-area-position-y);
} else {
can-drop-here = false;
}