mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-03 13:23:00 +00:00
lsp: Fix calculation of drop coordinates over the preview area
This commit is contained in:
parent
91e4a1bfa7
commit
c29314b2a8
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue