jsplumb / community-edition

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

jsplumb 2 - can't assign to property "_isJsPlumbGroup" #1052

Open vvasil3v opened 7 months ago

vvasil3v commented 7 months ago

Hello, I wanted to try the group, nodes and edges example with jsplumb 6, but cannot find working example - only js with array of groups. with version 2, i was able to show the groups, but not with .addGroup method.

groups.forEach(group => { const groupElement = document.createElement('div'); groupElement.classList.add('jtk-group','rounded'); groupElement.textContent = group.id; groupElement.id = group.id; groupElement.setAttribute("style","position:relative; left:" +group.left + "px ; top: "+group.top+"px"); $flowchart.append(groupElement); //till here is ok, but this is creating DIVs , not group instances. //if i try, i receive : can't assign to property "_isJsPlumbGroup" instance.addGroup({ el:group.id, id:group.id, anchor:"TopLeft", endpoint:[ "Rectangle", { width:10, height:10 } ] }); });

Am i missing something and is there any working example with the latest version - as far as i understood only browser-ui..js have to be added.

thank you