-
Notifications
You must be signed in to change notification settings - Fork 108
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
Ability to include an element in a dnd zone, without it being draggable (Element-specific dragDisable flag) #452
Comments
Sorry for the long delay. |
@isaacHagoel I think your suggestion forces people into an HTML structure that may not be prudent. Specifically, for something like this case, to place something like a '+' button within the same container may not work because the styling of elements is dependent on shared containers (think flex or grid). Placing it in an outer nesting container with the dnd zone inside causes some challenges with standard styling. I would think there would be a way to catch the dragstart event and simply cancel it via prevent default? I suppose that you might need a property to "pin" or "anchor" an element to an end so that it can't be shifted as well. I think it would be sensible to provide a mechanism to distinguish elements which are not wanted to be draggable. |
It sounds like a can of worms of edge-cases and complexity but I am open to
ideas. i am happy to look at more detailed requirements or a PR if you can
provide.
…On Tue, Sep 26, 2023 at 8:14 AM Charles Dorner ***@***.***> wrote:
@isaacHagoel <https://github.com/isaacHagoel> I think your suggestion
forces people into an HTML structure that may not be prudent.
Specifically, for something like this case, to place something like a '+'
button within the same container may not work because the styling of
elements is dependent on shared containers (think flex or grid). Placing it
in an outer nesting container with the dnd zone inside causes some
challenges with standard styling. I would think there would be a way to
catch the dragstart event and simply cancel it via prevent default? I
suppose that you might need a property to "pin" or "anchor" an element to
an end so that it can't be shifted as well.
I think it would be sensible to provide a mechanism to distinguish
elements which are not wanted to be draggable.
—
Reply to this email directly, view it on GitHub
<#452 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4OZC4SRPFWL3AFP3TI4MDX4H65RANCNFSM6AAAAAAYVUSD2E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@isaacHagoel this is completely valid use-case. It was reported in my library as well. Here is reproduction REPL. In there you are able to drag Probably simpler solution would be looking for |
I am wondering if there is a proposed way to do this, and if not, what you think of my solution.
I am trying to add elements into the dnd zone that "float" either in the beginning or end of the zone, but do not interact as dnd elements.
I couldn't find a way without having to play around with the entire zone's disableDrag flag.
Here is a video of the expected result:
Screen.Recording.2023-05-31.at.17.33.11.mov
The main thing being that you should be able to drag the element anywhere in the whole column, (seemingly outside of the dnd zone, but to do this you have to have the dnd zone be that large) and it should drop into the correct place.
I added this section to pointerAction.js:
This is the implementation code: The KanbanTicket component has a data-disabled="true" attribute set.
The text was updated successfully, but these errors were encountered: