jsplumb / community-edition

The community edition of jsPlumb, versions 1.x - 6.x
https://jsplumbtoolkit.com
Other
192 stars 14 forks source link

Connectors drawn outside (overflow: auto) container. #26

Open urbanhusky opened 7 years ago

urbanhusky commented 7 years ago

I've got a container in a flexbox. The size and position of the container can change dynamically. The content is also laid out dynamically and can cause the container to "overflow" (i.e. utilise scrollbars).

jsPlumb renders connectors of elements, which are outside the visible area.

sporritt commented 6 years ago

what do you think it should do in this case, @urbanhusky ? just hide them?

urbanhusky commented 6 years ago

The render area should be constrained to the actual width and height. Iirc jsPlumb uses an svg for rendering, so it should render with width="…", height="…" and viewBox="0 0 … …" - with the last two parameters being width and height again. However this needs proper resize handling etc. so I've ended up just quickly spinning up my own svg connector renderer and dropped jsPlumb.

sporritt commented 6 years ago

viewBox is for scaling. but i see what you are getting at. perhaps the SVG element could be clipped to match the top of the container that is being scrolled.