React-diagrams: Wrong link appearance while creating a link if zoom is activated

Created on 20 Nov 2019  路  17Comments  路  Source: projectstorm/react-diagrams

I am pointing at the second "Test 1" here with a zoom of around 60.

image

The issue is probably introduced by the recent bugfix of #469 concerning link placement offset

EDIT : Added more details

All 17 comments

I'll check this

Yes, it's a bug generated in the #469 bugfix, we forget to consider the zoom level in the calculation. @antonioru any idea of how to resolve this?

I fixed the bug. I'll open a new PR

I fixed the bug. I'll open a new PR

Thank you Mathias, I wasn't able to read your messages until now.
I apologise

I just noticed that it still has issues.

If you just click on the start port without moving the mouse, the link appear but the position is incorrect. When we start moving the cursor, the end position of the link is then ok

image

EDIT: It doesn't sound systematic

@pierre-moire can u tell me the exactly steps to reproduce the bug? I've tried here and it's work fine

I just zoom out then click on a out port to start creating a link. The mouse should not move at all when we click

Note that I am not sure if it's related to my own implementation. Feel free to close the ticket if you can't reproduce it

I just zoom out then click on a out port to start creating a link. The mouse should not move at all when we click

@antonioru can u replicate this bug? I tried here But failed to replicate

Note that I am not sure if it's related to my own implementation. Feel free to close the ticket if you can't reproduce it

@pierre-moire Can u share your code?

I reproduced it on the demo itself (dynamic ports for instance).

I add a port then:

  • mouse over the port
  • click and maintain the mouse button clicked without moving the pointer at all
  • release the mouse button
  • the 2nd point of the link gets 0, 0 as coordinates, which lead to invalid representation of the link

image

image

I just zoom out then click on a out port to start creating a link. The mouse should not move at all when we click

@antonioru can u replicate this bug? I tried here But failed to replicate

Yes I do!
There's a bug there, basically if you click on a port without dragging a new link it creates a nonsense link segment.
I don't think this is a bug we introduced with last merges but I'll take a took at it

Here's the bug in all its vivid majesty

Also @pierre-moire I don't think this is related to the zoom lv.
Can you please correct the issue title?

Also @pierre-moire I don't think this is related to the zoom lv.
Can you please correct the issue title?

@antonioru He needs to open another issue, the zoom description is from another bug already fixed
@pierre-moire please, open another issue, close and put a reference This one

folks I've created the issue:

481

@pierre-moire please close this one

Sure, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanieLazarLDAPPS picture DanieLazarLDAPPS  路  3Comments

maxbasque picture maxbasque  路  3Comments

dixitk13 picture dixitk13  路  3Comments

ganesh-sankey picture ganesh-sankey  路  4Comments

duvet86 picture duvet86  路  3Comments