Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gridSize option should accept function #1425

Open
alexandernst opened this issue Feb 8, 2021 · 3 comments
Open

gridSize option should accept function #1425

alexandernst opened this issue Feb 8, 2021 · 3 comments

Comments

@alexandernst
Copy link
Contributor

alexandernst commented Feb 8, 2021

The constructor of joint.dia.Paper receives gridSize as one of it's parameters. If set, the paper will behave grid-like, letting me place elements only at the intersections of each vertical and horizontal line of the grid (instead of letting me freely position elements wherever I want).

This is exactly what I want for my elements, but not for my links. If I set the grid size option and then start dragging the end of a link around the paper, it will "jump" from "point" to "point" on the paper.

This is a cross-post from https://groups.google.com/g/jointjs/c/391JoaUh01Q

/cc @kumilingus

@alexandernst
Copy link
Contributor Author

Hi Roman! Any news on this?

@kumilingus
Copy link
Contributor

No progress yet. This workaround should help though:

paper.on('cell:pointerdown', function(cellView) {
    paper.options.gridSize = (cellView.model.isElement()) ? 50 : 1;
});

@github-actions
Copy link

github-actions bot commented May 5, 2022

This issue is stale because it has been open 60 days with no activity. Please remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the stale This issue/PR shows no activity for an extended period of time. label May 5, 2022
@kumilingus kumilingus removed the stale This issue/PR shows no activity for an extended period of time. label May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants