I am trying to fit all my nodes into the top left position of the page when clicking a button.
I know I can do this:
function fitDiagram() {
diagram.zoomToRect(diagram.documentBounds)
diagram.centerRect(diagram.documentBounds)
}
But that will center my diagram, I want the end position to bring all my items into the top left position instead of the center.
Is there a method that can do that?