Changes in diagram-js v12

Hi,

As diagram-js v12 introduce a new ‘model’ package, can you explain how to use the factory functions exposed by this model package to create Model elements ?

What changes are needed to migrate from v11 to v12?

I didn’t find docs on it, thank you very much.

As the changelog says, with v12 model elements must be created via the model API.

You can check out the examples on using the model API tagged with @example: diagram-js/index.js at develop · bpmn-io/diagram-js · GitHub.

Thanks,

Create functions are still encapsulate in ElementFactory, so no change to do expect using isRoot, isLabel and isConnection from ModelUtil instead of ‘element instanceof Root’ for example.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.