File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717 let interval: any ;
1818
19+ let iWidth = $state (window .innerWidth );
20+ function updateWidth() {
21+ iWidth = window .innerWidth ;
22+ }
23+
1924 function mapRange(
2025 x : number ,
2126 inMin : number ,
4853 }
4954
5055 onMount (() => {
56+ // timer
5157 let hasTemporal: boolean = false ;
5258 try {
5359 hasTemporal = Temporal .Now .instant () !== undefined ;
6369 [timeHours , timeMinutes ] = getTime (hasTemporal );
6470 updateMarker ();
6571 }, 10000 );
72+
73+ // HACK: reactive window breakpoints for js
74+ window .addEventListener (" resize" , updateWidth );
6675 });
6776
6877 onDestroy (() => {
6978 clearInterval (interval );
79+ window .removeEventListener (" resize" , updateWidth );
7080 });
7181 </script >
7282
8494 <mask id =" orbitMask" mask-type =" luminance" >
8595 <rect x =" 0" y =" 0" width =" 100" height =" 100" fill =" white" />
8696 <rect
87- x =" 45"
97+ x ={ iWidth >= 768 ? " 45" : " 35 " }
8898 y =" 0"
89- width =" 10"
99+ width ={ iWidth >= 768 ? " 10" : " 30 " }
90100 height =" 50"
91101 fill =" black"
92102 transform ="rotate( {angle } 50 50)"
You can’t perform that action at this time.
0 commit comments