gridSize option should accept function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.4k
- Forks
- 893
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 26
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the joint.dia.Paper constructor and trace how the gridSize option affects element placement and link-end dragging. Reproduce the reported behavior with a gridSize configured, then verify that elements still snap while link endpoints can be positioned independently. Done means the requested option accepts a function as described by the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100