Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Fix folder dragging when parent has matrix #94

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

snickell
Copy link

Current code assumes the object being grabbed has a parent in the same matrix as world. We need to transform the current folder being dragged as offset from the parent matrix (NOT the world matrix).

Prior to this change folders jumped around like crazy if they were children of elements with a matrixWorld != identity.

Tested both with folders in the world space, and with folders with parents not in the world coordinates.

@xinaesthete
Copy link
Contributor

Hi, original devs have gone quiet but I've been reviewing your changes for my fork (which I'll probably be doing some more work on/with over the next couple of months).

Your initial bug fix looks good, and other stuff all sane etc, only thing is that it looks like MAX_FOLDER_ITEMS won't work so well with rows that aren't uniform height (including open nested folders as well as some other features that aren't in the original library). I think I'll try changing your version to a maxHeight property on folder, but haven't fully thought through what'll happen with lots of big nested folders or other edge cases.

In my laziness, I'm currently just putting any changes into my ImageButton branch - some of those involve extra features for which the API might change, so I was keeping those separate from 'normal' version, but I don't think there's anything breaking in the standard stuff (although I do plan on fixing #91 soon, which will involve breaking changes one way or another).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants