Skip to content

use offsetWidth and offsetHeight to handle zooming#51

Merged
tbo47 merged 2 commits intotbo47:mainfrom
milomg:patch-1
Dec 3, 2025
Merged

use offsetWidth and offsetHeight to handle zooming#51
tbo47 merged 2 commits intotbo47:mainfrom
milomg:patch-1

Conversation

@milomg
Copy link
Contributor

@milomg milomg commented Jul 29, 2025

previously if the node was created in a zoomed container, it would be incorrectly sized

milomg added 2 commits July 29, 2025 14:34
previously if the node was created in a zoomed container, it would be incorrectly sized
@tbo47
Copy link
Owner

tbo47 commented Jul 30, 2025

@aloisklink @sidharthv96 any opinion on this?

@JeanMeche
Copy link

@aloisklink
Copy link
Collaborator

@aloisklink any opinion on this?

Unfortunately, I've never use dagre's rendering before (and mermaid doesn't use it either so I can't test this change with that), and this isn't anything I'm familiar with.

From what I'm reading in https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements, I'm a bit worried that this might cause a breaking change if somebody sets labelStyle with transform: scale(0.5);. But then, that seems unlikely and it sounds like many people have issues with zoom and dagre-d3, see dagrejs/dagre-d3#227, dagrejs/dagre-d3#251, dagrejs/dagre#259, dagrejs/dagre-d3#336 🤷

IMO, maybe it's worth merging this and releasing it, and we can always revert it if anybody complains about the new behaviour.

@JeanMeche
Copy link

Let's go then ?

@tbo47 tbo47 merged commit dd9a902 into tbo47:main Dec 3, 2025
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Jan 7, 2026
superseeds angular#66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Jan 7, 2026
superseeds angular#66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Jan 7, 2026
superseeds angular#66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
kirjs pushed a commit to angular/angular that referenced this pull request Jan 7, 2026
superseeds #66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants