Skip to content

Commit

Permalink
fix(Polygons): make invertSelection() select all polygons before call…
Browse files Browse the repository at this point in the history
…ing selectBy
  • Loading branch information
meszaros-lajos-gyorgy committed Dec 20, 2023
1 parent e19ce0c commit d79eb91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Polygons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export class Polygons extends Array<Polygon> {

invertSelection() {
const oldSelection = this.selection
return this.selectBy((polygon, idx) => {
return this.selectAll().selectBy((polygon, idx) => {
return !oldSelection.includes(idx)
})
}
Expand Down

0 comments on commit d79eb91

Please sign in to comment.