I am having a problem in a functionality that uses the names of the constructors of the diagram elements. For example, when working locally, the node type elements have the constructor name “Shape”, the flow type elements are “Connection”, but when compiling the project to deploy I have noticed that these names are changed during compilation.
This is an insight of the constructors names, locally:
This is the case of the constructors names with the compiled project:
How can I resolve this inconsistency?
This is due to the fact that compilation performs minification. You’d want to prevent minifying the names to prevent this (can typically be fine-tuned).
I wonder though why you need this (at all). We typically rely on feature testing to figure out if a thing is a shape, connection or label. Using constructor names shall, at least for that purpose, not be necessary.
Okay! Thanks for the explanation regarding the compile-time minification.
Answering the question about why I used the name of the constructor, it was to evaluate whether a canvas element was shape or flow type, but now that I know this, I will do it directly by analyzing some characteristic of the businessObject of each element.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.