jsplumb icon indicating copy to clipboard operation
jsplumb copied to clipboard

Connectors drawn outside (overflow: auto) container.

Open urbanhusky opened this issue 8 years ago • 3 comments

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.

urbanhusky avatar Apr 06 '17 14:04 urbanhusky

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

sporritt avatar Nov 02 '17 04:11 sporritt

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.

urbanhusky avatar Nov 02 '17 08:11 urbanhusky

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.

sporritt avatar Nov 02 '17 09:11 sporritt