Skip to content

Commit

Permalink
Changed hotkey to ctrl+d and used clone() on the square before assign…
Browse files Browse the repository at this point in the history
…ing it to break the reference.
  • Loading branch information
RianM committed Oct 26, 2022
1 parent d0e5b47 commit fa0c91c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/layout/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class Layout {
const square = this.layout[selectedCellX][selectedCellY] as SquareType;

if (hoveredCell) {
this.setElement(hoveredCell[0], hoveredCell[1], square);
this.setElement(hoveredCell[0], hoveredCell[1], square.clone());
} else {
// If hoveredCell is undefined, duplicate to first Empty Square
for (let i = 0; i < this.height * 2 - 1; i++) {
Expand Down

0 comments on commit fa0c91c

Please sign in to comment.