fix: consistently compute the arcSize for edges and vertices by tbouffard · Pull Request #884 · maxGraph/maxGraph

@tbouffard

The arcSize of edges missed a division by 2, which was inconsistent with the past mxGraph behavior and the computation
done for vertices. This had been introduced by mistake in 0453da2.
The result of `getSwimlaneArcSize` was only correct when fallback to the default value. Otherwise, it missed the
division by 2 as well.

In addition, refactor:
  - remove duplication in various shapes (introduce Shape.getBaseArcSize)
  - simplify implementations
  - add tests
  - improve JSDOC for CellStyle.arcSize

BREAKING CHANGES: The `arcSize` of rounded shapes was not always correctly computed in the past.
The computation is now consistent everywhere in the code and matches the mxGraph behavior.
To have the same rendering as before for edges, you must multiply the `arcSize` by `2` in your styles.

@tbouffard added the bug

Something isn't working

label

Jul 23, 2025

@tbouffard tbouffard marked this pull request as ready for review

July 23, 2025 14:12

@tbouffard tbouffard deleted the refactor/improve_mgt_CellStyle_arcSize branch

July 23, 2025 16:00