community-edition
community-edition copied to clipboard
Repaint method shows error
Problem: when i'm trying to repaint an element like that:
this.instance.repaint(element, { left: data.x, top: data.y });
I see the following error:
TypeError: undefined is not an object (evaluating 'managedElements[elId].el')
But everything works fine, if source and target have the connection. But if they aren't connected, but initialized as source and target, i see that error. Is this a bug? Or there is another way to repaint non-connected sources and targets?
If i call repaint without the second argument, error is not showing
this is with the community edition? where did you get the impression that you could pass a new location to the repaint
method?
yes, it's a community edition. i followed the documentation: https://jsplumbtoolkit.com/community/doc/utilities.html
here's my class which manages jsPlumb instance. I wrote a comment on the 58 line where problem causes if it will be useful: https://gist.github.com/RevanScript/1f11eacbc12f5af07e75262f9dd9596a
yeah right, from the docs! i didnt know anyone bothered to read the documentation these days. how encouraging. i'll mark this as a defect then and take a look in the next couple of days.
thanks a lot! :)