JsPlumb Error: Invalid value for <svg> attribute width = "- Infinity"

I dynamically created a jsPlump graph

jsPlumb.ready(function(){ jsPlumb.setContainer('row'); var endPointLeft = { maxConnections : 1, onMaxConnections: function(info, e){ alert('Max. 1'); }, connector: ['Straight'], anchor: 'Right', endpoint: 'Dot', isSource: true, isTarget: true }; var endPointRight = { maxConnections : 1, onMaxConnections: function(info, e){ alert('Max. 1'); }, connector: ['Straight'], anchor: 'Left', endpoint: 'Dot', isSource: true, isTarget: true }; jsPlumb.addEndpoint($('.leftTree tbody').children().filter('.left'), {}, endPointLeft); jsPlumb.addEndpoint($('.rightTree tbody').children().filter('.right'), {}, endPointRight); // delete connection when clicked on jsPlumb.bind('click', function (connection, e) { jsPlumb.detach(connection); }); }); 

But every time I connect two points, I get the following error: "Error: invalid value for <svg> attribute width =" - Infinity "and" Error: invalid value for <svg> height height = "- infinity" ".

Does anyone know how to fix this?

+5
source share

Source: https://habr.com/ru/post/1241988/


All Articles