Skip to content

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Nov 17, 2024

In mxGraph, such configuration was possible by updating certain mxConstants values, but in maxGraph, constants are immutable.
It is now possible to use StyleDefaultsConfig to globally configure various shadow style parameters.
Previously, setting such parameters was a real pain. Certain methods had to be reimplemented in Canvas2D classes.

Finally, it is now possible to reset StyleDefaultsConfig properties to their default values using a dedicated reset function.

A new story has been added to demonstrate the effects of customizing style defaults and compare them with the original defaults.
Some existing stories have also been modified to change the default shadow settings to better match the related mxGraph examples from which they were taken.

Screenshots

A new story demonstrates how it is possible to changes the default shadow style values 👇🏿

PR_577_custom_default_shadow_styles.webm

Notes

Covers #192

In `mxGraph`, such configuration was possible by updating certain `mxConstants` values, but in `maxGraph`, constants are immutable.
It is now possible to use `StyleDefaultsConfig` to globally configure various shadow style parameters.
Previously, setting such parameters was a real pain. Certain methods had to be reimplemented in Canvas2D classes.

Finally, it is now possible to reset `StyleDefaultsConfig` properties to their default values using a dedicated reset function.

A new story has been added to demonstrate the effects of customizing style defaults and compare them with the original defaults.
Some existing stories have also been modified to change the default shadow settings to better match the related mxGraph examples from which they were taken.
@tbouffard tbouffard added the enhancement New feature or request label Nov 17, 2024
@tbouffard tbouffard marked this pull request as ready for review November 18, 2024 06:51
@tbouffard tbouffard merged commit 23a13d0 into main Nov 20, 2024
5 checks passed
@tbouffard tbouffard deleted the feat/allow_configure_global_style_defaults_shadow branch November 20, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant