Skip to content

DirectGraph Layout not starting from origin(0,0) in autoResize:true ,borderless:true paperScroller #2534

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

You must be logged in to vote

Perhaps you can redefine the computeRequiredPadding() as follows:

class MyPaperScroller extends joint.ui.PaperScroller {

    computeRequiredPadding(...args) {
        const { right, bottom } = super.computeRequiredPadding(...args);
        return {
            left: 0,
            top: 0,
            right,
            bottom
        }
    }
}

Replies: 2 comments 18 replies

Comment options

You must be logged in to vote
6 replies
@kumilingus
Comment options

@jibinjoy8897
Comment options

@kumilingus
Comment options

@jibinjoy8897
Comment options

@kumilingus
Comment options

Comment options

You must be logged in to vote
12 replies
@kumilingus
Comment options

@jibinjoy8897
Comment options

@jibinjoy8897
Comment options

@kumilingus
Comment options

Answer selected by jibinjoy8897
@jibinjoy8897
Comment options

@kumilingus
Comment options

@jibinjoy8897
Comment options

@kumilingus
Comment options

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