jquery.flowchart
jquery.flowchart copied to clipboard
Clear Flowchart Data but Maintain Settings
Hi,
Great work on this plugin! Is there a way to clear the flowchart data but maintain the other properties? I've used setData: {} and that clears the flowchart data but when a new operator is added the ID is not reset to 0 as I would expect.
Thanks!
Rob
Hi,
I ended up solving this issue by adding a new method to the control:
clearCanvas: function () {
this._clearOperatorsLayer();
this._clearLinksLayer();
this.data.operatorTypes = {};
this.data.links = {};
this.data.operators = {};
this.redrawLinksLayer();
},
btw what I call "canvas" is your flowchart-container.