From fe9d64ff3628080104e187763d24a2bbc9dd0c28 Mon Sep 17 00:00:00 2001 From: hwj <470553524@qq.com> Date: Wed, 28 Aug 2024 00:07:45 +0800 Subject: [PATCH] fix: optimizes selection nodes when strict box selection is enabled --- packages/x6/src/model/model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/x6/src/model/model.ts b/packages/x6/src/model/model.ts index a40912ccd55..6bce0cc8d7d 100644 --- a/packages/x6/src/model/model.ts +++ b/packages/x6/src/model/model.ts @@ -1038,7 +1038,8 @@ export class Model extends Basecoat { typeof x === 'number' ? options : (y as Model.GetCellsInAreaOptions) const strict = opts && opts.strict return this.getNodes().filter((node) => { - const bbox = node.getBBox() + const angle = node.angle() + const bbox = node.getBBox().bbox(angle) return strict ? rect.containsRect(bbox) : rect.isIntersectWithRect(bbox) }) }