Skip to content

OrgChart sample, modifying TreeLayoutView to use TreeLayout direction of BR #2854

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

You must be logged in to vote

The problem is with paper.transformToFitContent() method rather than layout direction.

The scaleGrid option snap the resulting zoom level to the closest grid. In your case, the scale was between 0 and 1 so it round down the scale to 0.
That made every element effectively invisible, impossible to get their correct SVG screen matrix. Hence the error.

If you wanted to use transformToFitContent() because of the alignment and padding without the zooming of the paper, you can use maxScale and minScale instead.

    this.paper.transformToFitContent({
        padding: {
            top: 16,
            bottom: 16,
            left: 16,
            right: 16
        },
        useModelGeometry: true,

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@pfalcon64
Comment options

@kumilingus
Comment options

@pfalcon64
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@pfalcon64
Comment options

Answer selected by pfalcon64
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