@av8orbynight wrote:
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;
...
$(go.Part, "Auto",
...
{ position: new go.Point(docWidth-180, docHeight-220),
selectable: false ,
alignment: go.Spot.BottomRight,
layerName: "Foreground"
},
Posts: 2
Participants: 2