Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour when dettaching children element #26

Closed
koas opened this issue Dec 20, 2019 · 3 comments
Closed

Strange behaviour when dettaching children element #26

koas opened this issue Dec 20, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@koas
Copy link

koas commented Dec 20, 2019

How to reproduce: drop an element, then drop another element as a child, then a third one as child of the second one, now we hace three connected elements.

Now dettach the second element from the first one by moving it away from the parent. The 2nd and 3rd elements disappear when you release the mouse button. This seemed a bit strange to me, I was expecting those two elements to remain connected and on screen, just independent from the first element.

But the real problem is that form this point on you can't drop another element. You can drag it to the canvas, but upon releasing the mouse button the element stays "glued" to the cursor.

Here's a video of this behaviour

@alyssaxuu alyssaxuu self-assigned this Dec 20, 2019
@alyssaxuu alyssaxuu added the bug Something isn't working label Dec 20, 2019
@alyssaxuu
Copy link
Owner

Just fixed it - was a small issue with the blue indicator block getting accidentally deleted and thus triggering a javascript error.

As per the blocks getting removed, I've currently kept it that way for simplicity, with only one tree, although if there's a lot of interest I could allow for multiple trees. Shouldn't be hard to implement, but it would lead to having blocks that overlap, making it harder to snap new blocks or to rearrange them.

@koas
Copy link
Author

koas commented Dec 20, 2019

Thanks a lot for the quick fix!

@johndkn
Copy link

johndkn commented Dec 26, 2019

As per the blocks getting removed, I've currently kept it that way for simplicity

When a block is detached from all blocks, is it possible to snap it back to the previous parent instead of removing it ?

Because when I click on the header (or on the 3 dots in the block header), my mouse often move just a little bit, and the block is suddenly removed.

Or maybe add a threshold distance value above which the block is removed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants