I’ve added a Part as legend to a specific spot, relative to the viewport right and bottom. This is on top of a Leaflet map. This works great when the page displays but when it is resized, the Part does not adjust to the new right and bottom. I calculate the doc height and width in the template creation process and use to make the initial positioning. How can I ensure that the Part floats and sticks close to the bottom right of the screen? (Perhaps there is a more “gojs-like” way to do it. Here’s my relevant code. I’ve tried calling Diagram.requestUpdate(…) but no luck. Even placing into a timed check loop doesn’t seem to work.
Thanks!
let docWidth = this.theDiagram.viewportBounds.width; let docHeight = this.theDiagram.viewportBounds.height;
…
`
but the problem of resize does not correct. When I resize my screen, Leaflet resizes (I use theMap.invalidateSize() there) but the legend stays in the same absolute position (ie out of the viewport).
Trying this.diagramComponent.theDiagram.layoutDiagram(true); does not work, even in a loop.