Skip to content

fix: correctly call methods in TemporaryCellStates and PrintPreview#546

Merged
tbouffard merged 3 commits intomainfrom
fix/TemporaryCellStates_PrintPreview
Oct 27, 2024
Merged

fix: correctly call methods in TemporaryCellStates and PrintPreview#546
tbouffard merged 3 commits intomainfrom
fix/TemporaryCellStates_PrintPreview

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Oct 11, 2024

In the PageBreaks story, the print page failed to display the graph.
This issue was mainly caused by maxGraph core calling functions on incorrect instances.

This problem originated during the migration from mxGraph, especially when switching from regular functions to arrow functions (changing the value of this).

Additionally, in TemporaryCellStates, the correct method oldDoRedrawShape is now called instead of oldValidateCellState.
The addition of types helped in identifying this issue.

Finally, PrintPreview now logs errors to the global logger, allowing easier troubleshooting in the future.
The previous error was hidden, and enabling logs made it possible to trace the source of the problem.

Notes

Closes #535

This fix is inspired by 4ddbdf5 which partially fixed the problem.

In the `PageBreaks` story, the print page failed to display the graph.
This issue was mainly caused by maxGraph core calling functions on incorrect instances, especially when switching from regular functions to arrow functions (changing the value of `this`).

This problem originated during the migration from mxGraph.

Additionally, in `TemporaryCellStates`, the correct method `oldDoRedrawShape` is now called instead of `oldValidateCellState`.
The addition of types helped in identifying this issue.

Finally, `PrintPreview` now logs errors to the global logger, allowing easier troubleshooting in the future.
The previous error was hidden, and enabling logs made it possible to trace the source of the problem.
@tbouffard tbouffard added the bug Something isn't working label Oct 11, 2024
@tbouffard tbouffard marked this pull request as ready for review October 11, 2024 16:12
@tbouffard tbouffard merged commit 3b84bf2 into main Oct 27, 2024
@tbouffard tbouffard deleted the fix/TemporaryCellStates_PrintPreview branch October 27, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PageBreak Story: "Print" does not work.

1 participant