Is it possible to embedded a GoJS diagram within a GoJS diagram. And if so, can we interact with each diagram independently. For example, zoom in one diagram independent of the other diagram.
No. The closest you can come is to overlay the diagram DIV elements, as for example is done in the Org Chart sample: Org Chart Static
That’s what I thought. Thank you Walter. Have a good day sir.
Walter,
I think I may have a better example that meets our needs, but I want to get some clarification.
You all have a Canvases example.
These canvases are embedded into a go.Picture control
Question: If we generate a chart using another library and render that chart as a HTML5 canvas into a picture control, can we interact with that chart as a separate canvas. So could we zoom on that chart object independent of the main diagram. What we are trying to do is have a dynamic chart embedded into a diagram. We plan to use another JS library to handle the charting (kind of like how you all use different libraries in your example), and allow our users to manipulate and interact with the chart while still being a component of the main diagram.
Well, GoJS normally handles all of the events. This allows one to click on a Picture and expect normal click handling, including selecting the Node and maybe performing other operations. But I suppose one could intercept all mouse events and pass them on to the hosted canvas if the events hit it.
By the way here’s an example of how GoJS can work in front of another library: Leaflet.js and GoJS