Skip to content

Objects would not snap to grid when using [mm] units #5011

@gefenm

Description

@gefenm

Preflight Checklist

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

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug
Objects would not snap to [mm] grid when using [mm] units.

To Reproduce
Steps to reproduce the behavior:

  1. using incognito tab Go to app.diagrams.net
  2. In "save diagrams to" popup select "decide later"
  3. go to: View -> Units -> Millimeters
  4. on the right side -> in the diagram tab -> in the Grid setting -> write 5mm
  5. On the left side pull a "Line" into the drawing
  6. pull one side of the line into the 5,5 corner
  7. pull other side of the line into 10,10 location
  8. Go to Arrange time of the line properties and inspect line start and line end values

Expected behavior
Line start should show 5,5
Line end should show 10,10

Screenshots
If applicable, add screenshots to help explain your problem.

Image

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

  • draw.io version 26.2.9

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Browser : Chrome
  • Browser Version : 134.0.6998.179 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
-Yes

Additional context
Seems to be applicable to different types of lines from the General section.
square behaves correctly.
Zooming very closely show that during dragging the line will snap into the correct position visually while showing wrong numbers, but releasing the mouse will result in an offset:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    declineddeclinedwontfixstale bot automatic label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions