fix(FitPlugin): handle edge cases in fitCenter calculation by tbouffard · Pull Request #831 · maxGraph/maxGraph
Prevent division by zero and non-finite scaling values when graph bounds have zero dimensions (width/height = 0) or when container is improperly sized. Maintains original scale in these invalid scenarios to ensure consistent behavior. This issue particularly used to affect headless environments (tests, Node.js) where containers may have zero height/width, which is less common in browser contexts.
tbouffard
deleted the
fix/FitPlugin_fitCenter_improve_robustness
branch
This was referenced
May 19, 2025This 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