React-diagrams: Links layer disappears on zoom

Created on 13 Nov 2018  路  3Comments  路  Source: projectstorm/react-diagrams

Might be related to #188
Seeing an unexpectedly empty 'links' layer (actually empty, you see the react empty comments) after implementing a simple 'zoom in' until the next interaction (ie a click or zoom will cause the links to show up).

Modified the 'zoom to fit' demo in a fork to serve as minimal repro

Here's a gif of the behavior:
zoom-in-links-missing

Most helpful comment

@JokerNN removing that call does fix the bug for me, thanks!
Didn't realize the engine would pick up changes to the mutable model automagically. Neato.

All 3 comments

I'm not sure if that's the reason but you're doing engine.setDiagramModel(model); in your event handler, and it is completely unnecessary

@JokerNN removing that call does fix the bug for me, thanks!
Didn't realize the engine would pick up changes to the mutable model automagically. Neato.

Hey @kmannislands glad it helped!
Didn't realize the engine would pick up changes to the mutable model automagically

  • for this case it's not really picking it up. It's just repaintCanvas call.
    In lots of different cases it does subscribe on model changes
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ganesh-sankey picture ganesh-sankey  路  4Comments

DanieLazarLDAPPS picture DanieLazarLDAPPS  路  3Comments

Nesterov-Konstantin picture Nesterov-Konstantin  路  4Comments

M2Costa picture M2Costa  路  3Comments

maxbasque picture maxbasque  路  3Comments