Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

zoomToFit() not returning perfectly fit viewport

$
0
0

@Charles wrote:

I have a diagram with a GraphLinksModel, and in certain cases (namely smaller graphs, as far as I can tell?) I'm getting a viewport after a zoomToFit() that is not exactly matched to one of the bounds of the document.

I.e. I would expect (and maybe this is incorrect) if the document bound's width and height are 20 and 20, I would expect either the viewport's width or it's height (but not necessarily both) to be 20.

This seems to be happening very consistently with my smaller diagrams, but not with larger ones, almost like the diagram is reluctant to make my nodes and links larger than a certain size, even though my overview diagram shows the model fitted like I would expect.

Is there some code or function to automatically give more space to a smaller set of nodes/links during a fit?

(I'm running Go.js version="1.4.20".)

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles