jgraph / jgraph/drawio

Draw.io defaults to 2.5 mm in Gird, but the value is actually not the grid value.

Open
#5,470 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-info wontfix
Dominant language
JavaScript
Stars
8.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Preflight Checklist
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Describe the bug
When I set the Unit to mm the GUI shows a grid value of 2.5 mm.
But, if I draw a rect, using the size of the react is e.g. 10.2 mm x 10.2 mm when the edges align to the grid (snapping to grid).
If I go into the value editor and re-type 2.5 mm into the editor the grid is changed.
From this on the snapped rects have the multiple of 2.5 mm in size, e.g. 10.0 mm x 10.0 mm

To Reproduce
Steps to reproduce the behavior:

  1. Start a new diagram
  2. Switch unit to mm
  3. Switch the grid to visible / active
  4. Check that 2.5 mm is shown for the grid size (do not re-edit the value!!)
  5. Try to draw a rect with size 10.0 mm x 10.0 mm (using snapping on the grid)
  6. The tooltip in the corner of the rect shows the size 10.2 mm x 10.2 mm

Expected behavior
10.0 mm x 10.0 mm should be possible

Screenshots

Image Image

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 29.4.0 (Web Version)

Additional context
Add any other context about the problem here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the web editor using the listed steps, with millimetres, a visible active grid, and snapping enabled. Trace how the displayed 2.5 mm grid value is applied, then verify that snapped rectangles can use exact 2.5 mm multiples such as 10.0 mm × 10.0 mm without re-editing the value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.