AlexeyBoiko / DgrmJS

Dgrm.net - flowchart editor. Works on desktop, phone and tablet. Has no dependency. Pure JavaScript.
https://dgrm.net
Apache License 2.0
906 stars 83 forks source link

expose SvgPath for customization #16

Closed tbo47 closed 2 years ago

tbo47 commented 2 years ago

expose SvgPath to be able to change the stroke or stroke-dasharray

AlexeyBoiko commented 2 years ago

Thanks for PR. Not sure how to do expose SvgPath best way:

I'll get back to this later. I hope you can use your patch in your project for now.

tbo47 commented 2 years ago

Ok, thanks. My use case is that the user can change the color of the connectors.

AlexeyBoiko commented 2 years ago

I applied your suggestion with little changes.

Changes:

  1. I remove IDiagram.shapeConnect(...) method. To create path or shape use IDiagram.add(type: PresenterChildAddType, param: PresenterShapeAppendParam | DiagramShapeConnectParam): IDiagramElement;

  2. IDiagram add event now fires when adding path.