Skip to content

Commit

Permalink
Always display text to prevent triggering layout
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwaterman committed Jan 31, 2020
1 parent db4b4cc commit 7056af4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Cell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
$: if (flaggable) setTimeout(() => surroundings.reveal(), 0);
let textColor;
$: if (isMine) {
$: if (!stateKnown) {
textColor = "transparent";
} else if (isMine) {
textColor = "white";
} else {
textColor = [
Expand All @@ -46,12 +48,7 @@
backgroundColor = null;
}
let cellText;
$: if(stateKnown){
cellText = isMine ? "X" : adjacentMinesCount;
} else {
cellText = "";
}
$: cellText = isMine ? "X" : adjacentMinesCount;
</script>

<style>
Expand Down

0 comments on commit 7056af4

Please sign in to comment.