bramp / js-sequence-diagrams

Draws simple SVG sequence diagrams from textual representation of the diagram
https://bramp.github.io/js-sequence-diagrams/
BSD 2-Clause "Simplified" License
7.8k stars 1.08k forks source link

Size problem when set display none then block #239

Open Serif-NNR opened 1 year ago

Serif-NNR commented 1 year ago

Hello guys,

If we set display none to the div containing the diagram in initialization step and after that change it as display block to be able to reveal the diagram according to some criteria, the size of the diagram doesn't suitable and it turns to very small rect areas.

As i guess, you don't recalculate the size and coordinates of the components belongs to the diagram when component is replaced or revealed. Maybe a listener mechanism can be performed for this.

Serif-NNR commented 1 year ago

Or in each time reallocate the diagram can be used after the operation related to the set of display attribute.