Skip to content

paper.getFitToContentArea() is not returning correct values with TreeLayoutView #2853

Answered by kumilingus
pfalcon64 asked this question in Q&A
Discussion options

You must be logged in to vote

Notice that my code requested a 16px padding on the right - but this is ignored by the dimensions returned by getFitToContentArea().

You need to use the allowNewOrigin: any if you want the origin be other than 0,0. e.g. If your content starts at 5,5 your padding is 16, the new origin (top-left paper corner) should be -9,-9.

I can manually handle the padding problem, but the height calculation is a problem. Is this a bug, or should I be using a different function to calculate the paper size?

The problem may be that in the first step you change the paper transformation (using transformToFitContent()) and when you resize the window you only change the paper size to its content, but do no…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pfalcon64
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants