GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” โœจ Announcing maxGraph 0.25.2 ๐ŸŽ‰ ยท maxGraph/maxGraph ยท Discussion #1338

โœจ Announcing maxGraph 0.25.2 ๐ŸŽ‰ #1338

redfish4ktc announced in Announces
โœจ Announcing maxGraph 0.25.2 ๐ŸŽ‰ #1338
@redfish4ktc redfish4ktc
Nov 20, 2026 ยท 0 comments
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

redfish4ktc
Nov 20, 2026
Maintainer

Version 0.25.2 released on 2026-11-20.

โšก This new version fixes several edge style behaviors that diverged from mxGraph, improving the rendering of diagrams imported from mxGraph and draw.io. โšก

This release contains no breaking change, but it fixes 4 behaviors that diverged from mxGraph or from the documented one. Code relying on the previous behavior may need to be adapted: each change is described below, with the way to keep the previous behavior when there is one.

Highlights

Behavior change: entryPerimeter and exitPerimeter default to true again

The entryPerimeter and exitPerimeter style properties now default to true instead of false. This restores the mxGraph default, which the JSDoc of CellStateStyle already documented: the default had been lost during the TypeScript conversion.

The default only applies when a fixed connection point is set, that is when both entryX and entryY (respectively exitX and exitY) are defined. In that case, the connection point is now projected onto the perimeter of the terminal, as in mxGraph, instead of being placed at the exact relative position inside the shape. Edges created interactively are not affected, since setConnectionConstraint always writes an explicit value.

Diagrams imported from mxGraph or draw.io are the main beneficiaries. These tools only write entryPerimeter=0 or exitPerimeter=0 when the perimeter is disabled and rely on the default otherwise, so their edges using fixed connection points were rendered differently by maxGraph.

To keep the previous maxGraph behavior, set the properties to false explicitly in the edge style:

graph.insertEdge({
  source,
  target,
  style: { entryX: 0, entryY: 0.5, entryPerimeter: false, exitX: 1, exitY: 0.5, exitPerimeter: false },
});

For more details, see #1160.

Behavior change: setCellStyles removes the keys set to null

setCellStyles (from styleUtils), and the AbstractGraph.setCellStyles method relying on it, now remove the key from the cell style when the value is null or undefined, as documented and as mxGraph did. Previously, the key was kept in the style with a null value.

This fixes the route of an edge after reconnecting one of its terminals: reconnecting clears the previous connection constraint by setting entryX/entryY or exitX/exitY to null, and the null values were read as the relative point (0, 0). So the edge ended at the top-left corner of the terminal, and its orthogonal route differed from the one shown during the preview (see #1087).

As a consequence, setting a style property to null with this method now makes the cell fall back to the value of the stylesheet, as in mxGraph, whereas the null value previously overrode it. Code inspecting cell.style directly also sees the difference. For instance, an edge inserted with insertEdge no longer carries sourcePort: null and targetPort: null in its style.

graph.setCellStyles('fillColor', null, [vertex]);
// before: vertex.style.fillColor === null, overriding the stylesheet
// now: 'fillColor' is no longer a key of vertex.style, the stylesheet value applies

For more details, see #1310.

Behavior change: GraphLayout stores booleans in the edge styles

GraphLayout.setEdgeStyleEnabled and GraphLayout.setOrthogonalEdge now store a boolean in the noEdgeStyle and orthogonal styles, and their value parameter is typed as boolean instead of any.

They previously stored the strings '0' and '1', as mxGraph did. But mxGraph parsed them back into numbers, while maxGraph reads them as they are, and both strings are truthy. So setEdgeStyleEnabled(edge, true) disabled the edge style, and setOrthogonalEdge(edge, false) made the edge orthogonal. The layouts of maxGraph only call these methods with the values that happened to work. Code calling them directly with the other values, or reading these styles in cell.style, sees the difference.

For more details, see #1311.

Behavior change for TypeScript users: type-safe value in setCellStyles

The value parameter of setCellStyles (from styleUtils) and of AbstractGraph.setCellStyles must now match the type of the given key in CellStateStyle, or be null or undefined. It was previously typed as any (respectively as the union of every style value), so any value could be passed for any key.

A call passing another type no longer compiles. Such calls were already wrong at runtime, since maxGraph reads these properties with their declared type, so fix the value rather than casting it. The stricter type revealed the GraphLayout bug described above.

// before: compiled, but the string '1' was not read as the expected boolean
graph.setCellStyles('orthogonal', '1', [edge]);

// now: the value must be a boolean, as declared in CellStateStyle
graph.setCellStyles('orthogonal', true, [edge]);

For more details, see #1028.

Bundle size: stable

The sizes of the examples are stable in both repositories: no example changes by more than 0.05 kB.

In the maxGraph repository, the only toolchain change is the upgrade of webpack from 5.111.1 to 5.112.2, which only builds the js-example* examples. Its pull request measured no size change (#1290).

In the maxgraph-integration-examples repository, the tooling did not change since the previous release.

Note

  • What each example contains: see the examples of the maxGraph repository and the projects of the maxgraph-integration-examples repository.
  • In the maxGraph repository, the js-example* examples are built with webpack and the size is the one of the whole application. The ts-example* examples are built with Vite and the size is the one of the maxGraph chunk only, which doesn't include the rest of the application.
  • In the maxgraph-integration-examples repository, the size is the one of the whole application, whatever the bundler.
  • The bundlers used in these examples are not tuned, they are mainly using the default configuration. So, it is probably possible to improve the tree-shaking efficiency in these examples.

Examples in the maxGraph repository

Example 0.25.1 0.25.2
js-example 464.01 kB 464.04 kB
js-example-selected-features 382.39 kB 382.37 kB
js-example-without-defaults 237.84 kB 237.83 kB
ts-example 426.19 kB 426.19 kB
ts-example-selected-features 359.16 kB 359.17 kB
ts-example-without-defaults 219.80 kB 219.77 kB

Projects in the maxgraph-integration-examples repository

Example 0.25.1 0.25.2
farm-ts 399.38 kB 399.39 kB
lit-ts 376.81 kB 376.83 kB
parcel-ts 502.48 kB 502.53 kB
rollup-ts 364.81 kB 364.83 kB
rsbuild-ts 344.86 kB 344.84 kB
vitejs-ts 361.03 kB 361.04 kB

Resources

  • npm package: @maxgraph/core 0.25.2
  • Fixed issues: milestone 0.25.2
  • Documentation: maxgraph_0.25.2_website.zip
  • Examples: maxgraph_0.25.2_examples.zip
  • Changelog (a summary of each version, with its breaking changes and behavior changes): changelog

What's Changed

๐Ÿ› Bug Fixes

  • fix(VertexHandler): rotate the children along with their parent by @redfish4ktc in fix(VertexHandler): rotate the children along with their parent #1152
  • fix: keep the orthogonal route when reconnecting an edge by @redfish4ktc in fix: keep the orthogonal route when reconnecting an edge #1310
  • fix: store booleans in the edge styles set by GraphLayout by @redfish4ktc in fix: store booleans in the edge styles set by GraphLayout #1311
  • fix: enforce type-safe value in setCellStyles by @redfish4ktc in fix: enforce type-safe value in setCellStyles #1028
  • fix: restore the default of entryPerimeter and exitPerimeter by @redfish4ktc in fix: restore the default of entryPerimeter and exitPerimeter #1160
  • fix: export the tree traversal functions by @redfish4ktc in fix: export the tree traversal functions #1316
  • fix(stories): make the OrgChart story work as in mxGraph by @tbouffard in fix(stories): make the OrgChart story work as in mxGraph #532
  • fix(segment): keep the bends of segment routes at every scale by @redfish4ktc in fix(segment): keep the bends of segment routes at every scale #1324
  • fix(stories): let KeyHandler receive the keys in every story by @redfish4ktc in fix(stories): let KeyHandler receive the keys in every story #1326

๐Ÿ“ Documentation

  • docs: add an analysis of extracting PanningMixin into a plugin by @redfish4ktc in docs: add an analysis of extracting PanningMixin into a plugin #1298
  • docs: remove long dashes and enrich the npm readme of core by @redfish4ktc in docs: remove long dashes and enrich the npm readme of core #1328
  • docs: list every mxGraphModel method moved to Cell by @redfish4ktc in docs: list every mxGraphModel method moved to Cell #1335

โš™๏ธ Refactor

  • refactor(stories): migrate HtmlLabel to TypeScript by @redfish4ktc in refactor(stories): migrate HtmlLabel to TypeScript #1327

๐Ÿ›  Chore

  • chore(examples): tighten the size budgets and keep them tight by @redfish4ktc in chore(examples): tighten the size budgets and keep them tight #1296
  • test: destroy the graphs the tests build by @redfish4ktc in test: destroy the graphs the tests build #1161
  • chore(claude): comment on a pull request opened by a bot by @redfish4ktc in chore(claude): comment on a pull request opened by a bot #1301
  • chore(claude): add build, review and mixin analysis agents by @redfish4ktc in chore(claude): add build, review and mixin analysis agents #1299
  • chore(claude): add an mxGraph archaeologist agent by @redfish4ktc in chore(claude): add an mxGraph archaeologist agent #1302
  • chore(claude): add an agent explaining bundle size changes by @redfish4ktc in chore(claude): add an agent explaining bundle size changes #1307
  • chore(claude): teach the mixin analyst the lessons of a review by @redfish4ktc in chore(claude): teach the mixin analyst the lessons of a review #1309
  • chore(claude): use the matching template for every issue body by @redfish4ktc in chore(claude): use the matching template for every issue body #1313
  • test: cover insertVertex with only a position or only a size by @redfish4ktc in test: cover insertVertex with only a position or only a size #1314
  • chore(claude): add a skill checking that every story renders by @redfish4ktc in chore(claude): add a skill checking that every story renders #1329

Full Changelog: v0.25.1...v0.25.2


This discussion was created from the release 0.25.2.
You must be logged in to vote
All reactions

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
๐Ÿ“ฃ
Announces
Labels
None yet
1 participant
@redfish4ktc
You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.