refactor!: move `AbstractGraph.fit` to `FitPlugin` by tbouffard · Pull Request #734 · maxGraph/maxGraph
tbouffard
marked this pull request as ready for review
This change better split responsibilities (reduce the amount of things done directly in Graph) and will improve the tree-shaking in the future. Passing parameters to `Graph.fit` is now simpler. The previous implementation used several positional parameters, which could be hard to follow and maintain. This change: - Improves the readability of the method call. - Minimizes the need to pass many default values. - Aligns the API with more modern, maintainable patterns. In addition, the implementation simplify min/max scale management BREAKING CHANGES: the `AbstractGraph.fit` method moved to `FitPlugin`, as well as the `minFitScale` and `maxFitScale` properties. The method now accepts a single parameter, mainly to minimize the need to pass many default values.
tbouffard
changed the title
refactor!: move
refactor!: move Graph.fit to FitPluginAbstractGraph.fit to FitPlugin
tbouffard
marked this pull request as ready for review
tbouffard
deleted the
refactor/move_Graph.fit_in_FitPlugin
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters