drawio icon indicating copy to clipboard operation
drawio copied to clipboard

Grid moves and shifts relative to drawing contents on changing zoom

Open davidrea opened this issue 8 years ago • 20 comments

Steps to reproduce:

  1. Create a new drawing, set grid to 5 pt.
  2. Draw one or more shapes whose edges and vertices lay cleanly on grid lines.
  3. Adjust the zoom to various levels; at some levels, the grid and object edges will no longer line up.
  4. Move the objects; they no longer snap to grid lines or intersections, landing in whitespace.
  5. If objects are moved at a zoom level where they do not align with the grid, their offsets relative to the grid persist at zoom levels where they previously aligned, making it impossible to reposition them back onto the grid.

This occurs in both web and desktop draw.io versions, and persists across closure/re-open of the same file. Previously-aligned items remain aligned, but groups can be pushed off-grid by moving them at the "wrong" zoom level. Objects' offset from the grid appears to be cyclic as the zoom level is changed over a large range.

I am running Draw.io 8.0.2 on Ubuntu Linux 16.04LTS with Chrome 63.0.3239.132.

davidrea avatar Jan 30 '18 03:01 davidrea

It's been some time since this bug was reported but I have trouble due to the same problem. I am using the latest release 10.6.3 . While making a timing waveform diagram it is important to match edges of the waveforms to the grid points but once the zoom is used those points get moved from the grid. To keep with the grid points I cannot use zoom.

vblanshey avatar Apr 18 '19 19:04 vblanshey

@vblanshey What OS are you using? At my place (draw.io online 11.1.2, Win10 and Chrome Version 74.0.3729.131 (Official Build) (64-bit) all looks ok.

mararad avatar Aug 07 '19 11:08 mararad

I have the same problem. It would be useful if it was attached to the grid and not outside the grid. The grid should remain in the same place during all adjustments and zooms. It would be good to be inspired by AutoCad

(Draw.io v 12.3.8 - Google Chrome V 78.0.3904.108 (official) (64-bit) - Win10 64b

Ogi22po avatar Dec 14 '19 17:12 Ogi22po

What about with 12.4.2?

davidjgraph avatar Dec 14 '19 18:12 davidjgraph

I have very similar problem. I don't think it changes on zoom however (so, perhaps different issue?). Steps to re-produce:

  1. Create detailed drawing very carefully with lots of nodes all aligned to grid.
  2. Save my work (yesterday).
  3. Re-open (today).
  4. Go to move something and realize all previous work is no longer aligned to grid.
  5. OCD_TRIGGERED_ani.gif

I am using Desktop, version 12.6.5.

EDIT: I may be mistaken. It took me a moment to realize, one of last things I did last night was zoom all the way out, put a box around all elements, and then center them on the page. Orange (IIRC) guide lines popped up (presumably to center) and I released on that, which is probably what moved them off grid lines. Because I have a couple other empty nodes on another page that are still aligned to the grid. So I think I need to just be more careful when I move things (especially to guidelines). I will pay closer attention now and post back if the problem persists.

TRSx80 avatar Apr 23 '20 16:04 TRSx80

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '20 03:11 stale[bot]

I have the same issue on new versions. May be it is due to I used old .drawio files. Draw.io version 14.9.2

MacOs 10.15.7 Safari 13.1.3. Tested also: Windows 7 Opera 50, Firefox 68.12

If I may, it is not so easy to draw with a such bug...

Thank you for great tool!

My best wishes to Team and community!

MykhailoMe avatar Jul 23 '21 22:07 MykhailoMe

I also am having this issue. Version is diagrams.net 20.2.8. I am using Windows 10 Enterprise.

Agree that this bug makes it very difficult to use draw.io!

I love draw.io, thanks for all work on it :)

CelesteGS avatar May 29 '24 13:05 CelesteGS

We only deal with reports on the latest releases.

davidjgraph avatar May 29 '24 14:05 davidjgraph

Yes fair enough! (I've been trying to get the latest version approved by my organisation, but don't know how likely that will be, so may only be able to use this version unfortunately)

CelesteGS avatar May 30 '24 09:05 CelesteGS

I've tried using the web version, 24.4.10, and the same issue is still occurring.

CelesteGS avatar May 30 '24 10:05 CelesteGS

can anyone show us a video?

davidjgraph avatar May 30 '24 13:05 davidjgraph

@davidjgraph

https://github.com/user-attachments/assets/cabde3b9-91fa-4c48-9039-0ebac66e55e5

Here you go. That's on the web version of drawio, on Firefox 133.0.3, Windows 10 Enterprise 22H2 build 19045.4651.

I did use some custom configuration, that is also shown in the video. I tested briefly on default values, and the problem still occurs, it is just significantly less visible. On these settings that I added, it is actually problematic and it makes the grid rather useless.

From what I could tell, it seems that it is really more a visual issue than the actual grid shifting, as it doesn't properly snap to the shown grid.

EDIT: In addition, it seems that the shifting only happens on certain zoom levels.

Archer6621 avatar Dec 29 '24 14:12 Archer6621

What version of draw.io is this?

alderg avatar Dec 30 '24 06:12 alderg

@davidjgraph 2024-12-29.15-02-07.mp4

Here you go. That's on the web version of drawio, on Firefox 133.0.3, Windows 10 Enterprise 22H2 build 19045.4651.

I did use some custom configuration, that is also shown in the video. I tested briefly on default values, and the problem still occurs, it is just significantly less visible. On these settings that I added, it is actually problematic and it makes the grid rather useless.

From what I could tell, it seems that it is really more a visual issue than the actual grid shifting, as it doesn't properly snap to the shown grid.

EDIT: In addition, it seems that the shifting only happens on certain zoom levels.

I found that if you put the grid size (in the page setup) to 2.5 (I think it will round it to 2 on its own), without any further configuration tweaks, massive shifting around of the grid will occur when zooming in/out.

Archer6621 avatar Jan 02 '25 17:01 Archer6621

What version of draw.io is this?

The web version that is hosted here: https://app.diagrams.net

Currently: v26.0.2

Archer6621 avatar Jan 03 '25 11:01 Archer6621

We're unable to reproduce the problem. Can someone please give a sample diagram and a zoom level where this happens?

alderg avatar Sep 16 '25 11:09 alderg

Image same thing, mismatch in grid and shapes contour

40%, 60%, 70%, 85%, 210%

v28.1.2 standalone, win 11

dmitry-smith-snlpm avatar Oct 14 '25 10:10 dmitry-smith-snlpm

Image

simple diagram.drawio

diagram in attachment

dmitry-smith-snlpm avatar Oct 14 '25 10:10 dmitry-smith-snlpm

We're unable to reproduce the problem. Can someone please give a sample diagram and a zoom level where this happens?

Hi! Are these screenshots enough to repeat the situation and identify the cause of the problem?

dmitry-smith-snlpm avatar Oct 20 '25 11:10 dmitry-smith-snlpm