mirror of
https://github.com/zen-browser/desktop.git
synced 2026-03-06 16:57:04 +00:00
fixed issue with removing dots in wrong order
This commit is contained in:
@@ -543,6 +543,15 @@
|
||||
}
|
||||
this.dots = this.dots.filter((dot) => dot.Element !== event.target);
|
||||
event.target.remove();
|
||||
|
||||
this.dots.sort((a, b) => a.ID - b.ID);
|
||||
|
||||
// Reassign the IDs after sorting
|
||||
this.dots.forEach((dot, index) => {
|
||||
dot.ID = index;
|
||||
});
|
||||
|
||||
console.log(this.dots);
|
||||
let colorPositions = this.calculateCompliments(this.dots, true);
|
||||
this.handleColorPositions(colorPositions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user