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

Feature: Make tree hitbox zones configurable #49

Open
buzzie-bee opened this issue May 7, 2024 · 1 comment
Open

Feature: Make tree hitbox zones configurable #49

buzzie-bee opened this issue May 7, 2024 · 1 comment

Comments

@buzzie-bee
Copy link

I've implemented a tree drag and drop and for business logic reasons certain items cannot be dropped onto other items.

I have implemented a 'make-child' block, but when dragging items over these blocked items the indicators are very janky, they flash in and out as the mouse moves. This is because the instruction is being set to 'instruction blocked' when the mouse is near the center of the items.

It would be nice for new users to be able to configure the zones via arguments, instead of having to clone the hitbox code and customise it yourself (which is straightforward enough once you're used to pragmatic-drag-and-drop).

I'm thinking it would be great to pass in some enabled/disabled flags along with percentage values for the different zones. This would allow users to remove zones for instructions which are blocked completely, i.e. only allow make child, only allow reorder-above/below, only have blocked, etc.

@alexreardon
Copy link
Collaborator

As a stop gap, you are totally free to copy our tree hitbox (and tree indicator) packages and adjust them to your needs. It's one of the nice things about hitboxes / indicators being optional additions

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

No branches or pull requests

2 participants