Skip to content

Constants.ts may be designed incompatible with mxConstants when migrating from mxGraph #192

@rivenww

Description

@rivenww

Hello guys, here are some suggestions about Constants.ts. I have used mxgraph for a long time and I receive a mail from my my former colleagues.
When we used mxgraph previously, we know that the mxConstants is modifiable, be like a kind of global varaibles collection.
So, we can simply modify one of its value and change the global apperance.
For example, when I want the stroke width of the edges to be 3px in my graph, I should change the value in mxConstants.

However, in the new version, we define all the values separately and they are all defined with const keyword in typescript. This isn't the original intention of mxConstants.
It should be a const object, with values inside the object. So that the users won't change the reference of the constant object but users can change the value in it.
The Constants.ts make maxGraph is very difficult for developers to customize.
Thanks, and if anyone agree with my opinions, please let me know and maybe I can make a pull request for this repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions