Skip to content

Commit

Permalink
fix: optimizes selection nodes when strict box selection is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hwjom committed Aug 27, 2024
1 parent 9565e27 commit fe9d64f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/x6/src/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,8 @@ export class Model extends Basecoat<Model.EventArgs> {
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)
})
}
Expand Down

0 comments on commit fe9d64f

Please sign in to comment.