Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/game/animation/updateBlocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ function removeBlockAndUpdateBlocksPosition(block: Block, blocks: Block[]) {
// make to-be-removed element red just a moment before removing it
const element = block.element as HTMLElement // TODO: remove type assertion
const originalBorderWidth = getComputedStyleWithCache(element).borderWidth
element.style.border = `${originalBorderWidth === "0px" ? "1px" : originalBorderWidth} solid red`
if (originalBorderWidth === "0px") {
element.style.outline = "1px solid red"
} else {
element.style.border = `${originalBorderWidth} solid red`
}

setTimeout(() => {
removeBlock(block)
Expand Down
4 changes: 2 additions & 2 deletions src/game/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export function visualizeBlocks(blocks: Block[]) {
if (blocks[i].remain) {
;(blockElement as HTMLElement).style && // TODO: remove type assertion
Object.assign((blockElement as HTMLElement).style, {
border: "0.1px solid red"
outline: "0.1px solid red"
})
} else {
;(blockElement as HTMLElement).style && // TODO: remove type assertion
Object.assign((blockElement as HTMLElement).style, {
border: "none"
outline: "none"
})
}
}
Expand Down