You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it seems that the widget must be added to the shell and activated to actually generate the SVG content of the diagram, for instance using the doOpen method of the DiagramManager class. And we should avoid that when displaying the diagram in a preview pane.
Is it possible ? Or does it require some change in sprotty-theia library ?
Thanks for your help !
The text was updated successfully, but these errors were encountered:
Yes, DiagramWidget#onAfterAttach has to be called in order to set up the hierarchy of DOM elements needed for the diagram, the status message and the hidden rendering, as well as for setting up the behavioral part (SVG is just the rendering).
I haven't dug into the details, but it looks like you have to add your own classes for the preview and re-use/copy what's in DiagramWidget#onAfterAttach and in the DiagramManager.
Hi,
I'm trying to display a Diagram in a preview pane as defined in the preview package.
My idea was to generate the Diagram widget using the
createWidget
method of theDiagramManager
class then using thegetSvgElement
method of theDiagramWidget
class in therenderContent
method of thePreviewHandler
interface.However, it seems that the widget must be added to the shell and activated to actually generate the SVG content of the diagram, for instance using the
doOpen
method of theDiagramManager
class. And we should avoid that when displaying the diagram in a preview pane.Is it possible ? Or does it require some change in sprotty-theia library ?
Thanks for your help !
The text was updated successfully, but these errors were encountered: