Skip to content

feat: ease configuration of handles in VertexHandler#569

Merged
tbouffard merged 6 commits intomainfrom
feat/override_handles_default_values
Nov 10, 2024
Merged

feat: ease configuration of handles in VertexHandler#569
tbouffard merged 6 commits intomainfrom
feat/override_handles_default_values

Conversation

@tbouffard
Copy link
Member

In mxGraph, such configuration was possible by updating some mxConstants values, but in
maxGraph, constants are immutable.
It is now possible to use VertexHandlerConfig to globally configure various settings like the fill color.
Previously, configure such settings required to extend VertexHandler.

A new HandleConfig object was added for shared settings with edge handlers which are now using it
as well.

Some stories hadn't been fully migrated from mxGraph: the mxGraph examples relied on updating
mxConstants values to configure handles. They have been updated as well to better match the mxGraph
behaviour.

Lastly, it is possible to reset the properties in HandleConfig and VertexHandlerConfig to their
default values by using dedicated reset functions.
The stories use them at initialization to prevent side effects from other stories (as these settings
apply globally).

Notes

Covers #192

In `mxGraph`, such configuration was possible by updating some mxConstants values, but in
`maxGraph`, constants are immutable.
It is now possible to use `VertexHandlerConfig` to globally configure various settings like the fill color.
Previously, configure such settings required to extend `VertexHandler`.

A new `HandleConfig` object was added for shared settings with edge handlers which are now using it
as well.

Some stories hadn't been fully migrated from mxGraph: the mxGraph examples relied on updating
mxConstants values to configure handles. They have been updated as well to better match the mxGraph
behaviour.

Lastly, it is possible to reset the properties in `HandleConfig` and `VertexHandlerConfig` to their
default values by using dedicated reset functions.
The stories use them at initialization to prevent side effects from other stories (as this settings
apply globally).
@tbouffard tbouffard added the enhancement New feature or request label Nov 9, 2024
@tbouffard tbouffard changed the title feat: introduce a way to configure handles in VertexHandler feat: ease configuration of handles in VertexHandler Nov 10, 2024
@tbouffard tbouffard marked this pull request as ready for review November 10, 2024 08:32
@tbouffard tbouffard merged commit ea19cbc into main Nov 10, 2024
@tbouffard tbouffard deleted the feat/override_handles_default_values branch November 10, 2024 08:43
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