jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.64k stars 721 forks source link

Misaligned routes when chrome zoom is not 100% #218

Closed TLeiter closed 3 years ago

TLeiter commented 3 years ago

When user has a different zoom factor in Chrome, the routes are not alligned.

The following example was done with the demo application:

2021-07-26 09_22_15-Clipboard

jerosoler commented 3 years ago

Uhmmm. What is your version of crhome?

image

TLeiter commented 3 years ago

Last one Version 92.0.4515.107 (Official Build) (64-bit)

TLeiter commented 3 years ago

Zoom at 150% works fine, but 125% not.

jerosoler commented 3 years ago

Work in 125%

image

This I think could be due to a browser problem rather than a library problem.

With the library you can set a zoom.

Fr1411 commented 3 years ago

i have the same problem with chrome Versión 92.0.4515.107 (Build oficial). No zoom.

image

zoom 80% its works image

jerosoler commented 3 years ago

@Fr1411 If you move any node, are they still wrong?

I see the images of the demo. The same thing happens without the demo.

jerosoler commented 3 years ago

I just installed the latest version and I see that it also happens.

image

Fr1411 commented 3 years ago

@jerosoler yes! if i move any node it´s the same. In my project the situation is equal image

Fr1411 commented 3 years ago

@jerosoler Do you think this problem will be solved?

Ammy22 commented 3 years ago

Temporary fix is image

jerosoler commented 3 years ago

Fix in new version 0.0.48 https://github.com/jerosoler/Drawflow/releases/tag/0.0.48

Removed transform tranlate from connection.

The new css looks like this:

.drawflow .connection {
  position: absolute;
  pointer-events: none;
}
.drawflow .connection .main-path {
  fill: none;
  stroke-width: 5px;
  stroke: steelblue;
  pointer-events: all;
}
.drawflow .connection .main-path:hover {
  stroke: #1266ab;
  cursor: pointer;
}

.drawflow .connection .main-path.selected {
  stroke: #43b993;
}

.drawflow .connection .point {
  cursor: move;
  stroke: black;
  stroke-width: 2;
  fill: white;
  pointer-events: all;
}

Update Demo page

Ammy22 commented 3 years ago

thank you so much for fixing it


From: Jero Soler @.> Sent: 04 August 2021 22:02 To: jerosoler/Drawflow @.> Cc: Ammy @.>; Comment @.> Subject: Re: [jerosoler/Drawflow] Misaligned routes when chrome zoom is not 100% (#218)

Fix in new version 0.0.48 https://github.com/jerosoler/Drawflow/releases/tag/0.0.48

Removed transform tranlate from connection.

The new css looks like this:

.drawflow .connection { position: absolute; pointer-events: none; } .drawflow .connection .main-path { fill: none; stroke-width: 5px; stroke: steelblue; pointer-events: all; } .drawflow .connection .main-path:hover { stroke: #1266ab; cursor: pointer; }

.drawflow .connection .main-path.selected { stroke: #43b993; }

.drawflow .connection .point { cursor: move; stroke: black; stroke-width: 2; fill: white; pointer-events: all; }

Update Demo page

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/jerosoler/Drawflow/issues/218#issuecomment-892801905, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN6MZCSQBXWQ6MOBLDQWWOLT3FTQFANCNFSM5A7QMZHA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

Fr1411 commented 3 years ago

Thank you!