jsplumb / community-edition

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

not draggable elements with setContainer #34

Open LilKiwi opened 6 years ago

LilKiwi commented 6 years ago

Hello people, I have following problem ... I used jsplumb in a project using a plumber-service.ts. if I write following:

constructor(_flowchartService: FlowChartService) {
this.jsPlumb.setContainer("flowdesigner");
}

I see my arrows and stubs, but they are not draggable.. (on reload they are draggable again) if I write it like this

constructor(_flowchart: FlowChart) {
this.jsPlumb.setContainer("flowdesigner");
this.jsPlumb.bind("connection", (info) => {
      that._flowchart.addConnection(info);
      this.jsPlumb.select(info).addOverlay(["Arrow", { width: 10, length: 30, location: 1 }]);//without that i dont have arrows on reload
})
}

I get double arrows and connections. i can drag the first connection and detach it, but the second is still visible. if i dont set the container neither stubs nor arrows are shown Any idea how to make it draggable in the service? Or how to fix the double connection issue? (the draggable is set in another component)

LilKiwi commented 6 years ago

Updae: even if I put the setcontainer into the component constructor where the draggable is, it still doesnt let me drag the items