Skip to content

Commit

Permalink
feat: highlight 3d press
Browse files Browse the repository at this point in the history
  • Loading branch information
andy23512 committed May 11, 2024
1 parent a865e2a commit be7e219
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions src/app/components/switch/switch.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
[highlightKey]="highlightKey()"
></svg:g>
}
<svg:circle
class="fill-alnitak-500"
[attr.cx]="center().x"
[attr.cy]="center().y"
[attr.r]="53.68"
[attr.opacity]="
highlightKey()?.positionCodes?.includes(positionCodeMap().c) ? 0.5 : 0
"
></svg:circle>
<svg:text
[attr.x]="center().x"
[attr.y]="center().y"
Expand Down
10 changes: 5 additions & 5 deletions src/app/pages/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export class HomePageComponent {
readonly router = inject(Router);
firstLessonUrl = '/topic/number/lesson/123';
highlightPositionCodes: number[] = [
[-1, -1, 1, 3],
[-1, -1, 2, 4],
[-1, -1, 6, 8],
[-1, -1, 7, 9],
].map((list) => pickRandomItem(list));
[0, 1, 2, 3, 4, [1, 2], [1, 4], [3, 2], [3, 4]],
[5, 6, 7, 8, 9, [6, 7], [6, 9], [8, 7], [8, 9]],
]
.map((list) => pickRandomItem(list))
.flat();

@HostBinding('class') classes = 'block relative h-full';

Expand Down

0 comments on commit be7e219

Please sign in to comment.