Skip to content
Discussion options

You must be logged in to vote

When a port group uses the default positioning algorithms, JointJS places the ports relative to the element’s bounding box - i.e., the rectangle defined by the element’s size attribute.

How exactly does your shape definition look like? Are you certain you need to be using an image? This shape could be declared as an SVG path using JointJS, which could potentially save you some work.

If you are setting the width and height like this:

attrs: {
        // ...
        image: {
            width: 'calc(w)', // this takes up all the available width
            height: 'calc(h)', // this take up all the available height
        },
       // ...
}

The problem arises when you resize the element an…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by AvanArgs
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