Issue with Re-merging Shapes in diagrams.net Embedded in a Web Application #4229
Unanswered
reinoutkoninkx
asked this question in
Q&A
Replies: 1 comment 7 replies
-
How is the re-added shape using the old ID? Is it an undo? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently working with a web application that incorporates an embedded version of diagrams.net within an iframe. We manage the hosting of diagrams directly in our own database, and this setup has been functioning smoothly.
In our application, we provide users with a selection of custom shapes that are intended for use within their diagrams. These shapes are accessible through a custom menu. To integrate these shapes into the diagrams, we utilize the PostMessage API with the 'merge' action. This method allows for the shapes to be seamlessly integrated into the diagrams, maintaining the focus without the disruptions typically caused by the 'load' action. This process has been working exceptionally well.
However, we have encountered an issue when a shape, previously added to a diagram, is deleted. Although the shape appears to be removed successfully from the diagram, any attempt to re-merge the same shape (using the identical id) into the diagram fails; the shape does not get re-added. This issue persists until the browser window is refreshed. After a refresh, the shape can be merged again, but the problem reoccurs if the shape is removed and an attempt is made to merge it back in.
Has anyone experienced a similar issue or can provide insights into what might be causing this behavior and how to resolve it?
I look forward to any help!
Thanks,
Reinout
Beta Was this translation helpful? Give feedback.
All reactions