When specifying connectType under default.line during the initial configuration, the setting is not applied.
It seems to be ignored until the value is explicitly set later.
In the reproduction code, I set connectType: 'straight', but when drawing a connect line in the editor, it is still created as an elbow.
Snippet to reproduce the issue: https://snippet.dhtmlx.com/kpai96ga
Expected behavior:
The connectType defined in editor.config.default.line should be respected during initialization.
Could you please confirm if this is a bug or if there is another recommended approach?
Currently, there is no built-in config to define the connectType for new created connections. It’s a designed behavior, but I already sent request to the dev team, and they will try to add this possibility to future versions.
Currently, you can solve this issue, by manually changing the connectType from the beforeAdd event:
Thanks for the clarification and the workaround with the beforeAdd event.
Good to hear the request is with the dev team. I’ll use the workaround for now and wait for it to be fixed in a future release.
This answers my question, so I’ll close the topic.
Thank you.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan