React Widget not working #13707
Replies: 2 comments 1 reply
-
Hello, Thanks for reaching out. It's a bit challenging to diagnose the problem without seeing and debugging your code directly. Integration issues like these can be tricky! However, integrating functionality similar to what you're describing is indeed possible. We've implemented something like this in the Theia integration of the GLSP project for diagram editors. Although it's not a React widget, you might find some insights by looking at the implementation of the GLSP Diagram Widget. For the use cases where we've implemented drag and drop (and not "click palette, click canvas"), I don't remember anything specific we had to do to make it work. Maybe you are dealing with event propagation or Z-index issues? |
Beta Was this translation helpful? Give feedback.
-
Hello @planger , Thanks for your prompt response. Just to give you a more clear picture, we are using react-dnd library for drag and drop functionality and not utilizing GLSP Diagram Widget. React DND uses HTML5 drag and drop API under the hood and hides its quirks. This library automatically triggers hover event when any component is dragged over canvas and provide isOver state set to true, however this is not happening when we integrated it as react widget in theia. We would like to understand if Theia supports HTML5 drag and drop API or is there any other way to achieve the same task. https://react-dnd.github.io/react-dnd/about Request you to provide assistance on same. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Hello Team,
We have created a React application which provides the functionality to drag and drop components onto canvas. Please refer below Screenshot for your reference.
We are facing an issue as post integrating this application as react widget, Drag feature is working as expected, however elements are not dropping onto canvas. It seems like post integration with theia application, dropTarget is unrecognisable within application, it cannot understand if the element is being hovered over the canvas. Request you to help us understand what could be the reason for same.
Beta Was this translation helpful? Give feedback.
All reactions