Skip to content

feat: ease configuration of handles in EdgeHandler#576

Merged
tbouffard merged 10 commits intomainfrom
feat/override_edge_handlers_default_values
Nov 22, 2024
Merged

feat: ease configuration of handles in EdgeHandler#576
tbouffard merged 10 commits intomainfrom
feat/override_edge_handlers_default_values

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Nov 16, 2024

In mxGraph, such configuration was possible by updating some mxConstants values, but in maxGraph,
constants are immutable.
It is now possible to use EdgeHandlerConfig to globally configure various settings like the stroke
color.
Previously, configuring such settings required to extend EdgeHandler and its subclasses.

The HandleConfig object has been updated to also let configure the label handles, for example,
their size and fill color. The new properties are now used in EdgeHandler and VertexHandler.

Lastly, it is possible to reset the properties in EdgeHandlerConfig to its default values by using
a dedicated reset function.

A new story has been added to demonstrate the effects of customizing “handle” defaults and comparing
them with the original defaults.

Notes

Covers #192

Demo of the new story

PR_576_new_story_config_handles.webm

In `mxGraph`, such configuration was possible by updating some mxConstants values, but in `maxGraph`,
constants are immutable.
It is now possible to use `EdgeHandlerConfig` to globally configure various settings like the stroke
color.
Previously, configuring such settings required to extend `EdgeHandler` and its subclasses.

The `HandleConfig` object has been updated to also let configure the label handles, for example,
their size and fill color. The new properties are now used in `EdgeHandler` and `VertexHandler`.

Lastly, it is possible to reset the properties in `EdgeHandlerConfig` to its default values by using
a dedicated reset function.

A new story has been added to demonstrate the effects of customizing “handle” defaults and comparing
them with the original defaults.
@tbouffard tbouffard added the enhancement New feature or request label Nov 16, 2024
@tbouffard tbouffard marked this pull request as ready for review November 22, 2024 13:01
@tbouffard tbouffard merged commit 988ff48 into main Nov 22, 2024
@tbouffard tbouffard deleted the feat/override_edge_handlers_default_values branch November 22, 2024 13:03
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