Skip to content

Commit

Permalink
don't recalculate bounding box when already cached
Browse files Browse the repository at this point in the history
refs #3264
  • Loading branch information
mikekucera committed Aug 27, 2024
1 parent 3f60b38 commit 0a113f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collection/dimensions/bounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ let cachedBoundingBoxImpl = function( ele, opts ){
let isPosKeySame = _p.bbCachePosKey === currPosKey;
let useCache = opts.useCache && isPosKeySame;
let isDirty = ele => ele._private.bbCache == null || ele._private.styleDirty;
let needRecalc = !useCache || isDirty(ele) || (isEdge && isDirty(ele.source()) || isDirty(ele.target()));
let needRecalc = !useCache || isDirty(ele) || (isEdge && (isDirty(ele.source()) || isDirty(ele.target())));

if( needRecalc ){
if( !isPosKeySame ){
Expand Down

0 comments on commit 0a113f5

Please sign in to comment.