How to disable dragging? #244
Unanswered
DavraYoung
asked this question in
Q&A
Replies: 3 comments
-
It's turns out, if |
Beta Was this translation helpful? Give feedback.
0 replies
-
any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using
0.2.0-alpha.23
craftjs version. We try to implement free positioning of craftjs node elements based on the properties. So depending on component props it will use either CraftJS Drag or React Draggale drag. And now we faced a problem:We cannot disable drag handler on our component, after it was initialized as
ref={ref=>connect(drag(ref))}
.We tried changing react key, so that ref function gets called when props is changed, so that we can conditionally run
connect(drag(ref))
or justconnect(ref)
, but dragging is still handled on CraftJS side. How can we dynamically disable Craft JS dragging?Using craft.rules.canDrag function does not help, as it only prevents component from being dropped (for some reason), whereas in our case we want to completely disable drag control, so that React Draggable can handle it appropriately.
Beta Was this translation helpful? Give feedback.
All reactions