Skip to content

Commit 076ec5c

Browse files
committed
fix: snap sky compass SVG to exact position, no elastic tween
1 parent e5574f1 commit 076ec5c

2 files changed

Lines changed: 22 additions & 18 deletions

File tree

dist/adaptive-cover-pro-card.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ function e(e,t,o,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPro
242242
stroke: var(--warning-color, gold);
243243
stroke-width: 1;
244244
stroke-opacity: 0.7;
245-
transition: all 0.3s ease;
245+
transition:
246+
fill 0.3s ease,
247+
fill-opacity 0.3s ease,
248+
stroke 0.3s ease,
249+
stroke-opacity 0.3s ease;
246250
}
247251
/* Static FOV envelope shown dim beneath the active sun arc — lets the
248252
reader see the configured ±fov_left/right span at the same time as
@@ -259,7 +263,11 @@ function e(e,t,o,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPro
259263
stroke: var(--primary-color);
260264
stroke-width: 1;
261265
stroke-opacity: 0.6;
262-
transition: all 0.3s ease;
266+
transition:
267+
fill 0.3s ease,
268+
fill-opacity 0.3s ease,
269+
stroke 0.3s ease,
270+
stroke-opacity 0.3s ease;
263271
}
264272
.blind-spot {
265273
fill: var(--error-color, crimson);
@@ -283,10 +291,7 @@ function e(e,t,o,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPro
283291
}
284292
.sun {
285293
fill: var(--secondary-text-color);
286-
transition:
287-
cx 0.3s ease,
288-
cy 0.3s ease,
289-
fill 0.3s ease;
294+
transition: fill 0.3s ease;
290295
}
291296
.sun.up {
292297
fill: #ffe680;
@@ -438,9 +443,6 @@ function e(e,t,o,s){var i,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPro
438443
.moon-lit {
439444
fill: var(--secondary-text-color);
440445
opacity: 0.75;
441-
transition:
442-
cx 0.3s ease,
443-
cy 0.3s ease;
444446
}
445447
.dot.moon-dot {
446448
background: var(--secondary-text-color);

src/components/sky-compass.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,11 @@ export class SkyCompass extends LitElement {
680680
stroke: var(--warning-color, gold);
681681
stroke-width: 1;
682682
stroke-opacity: 0.7;
683-
transition: all 0.3s ease;
683+
transition:
684+
fill 0.3s ease,
685+
fill-opacity 0.3s ease,
686+
stroke 0.3s ease,
687+
stroke-opacity 0.3s ease;
684688
}
685689
/* Static FOV envelope shown dim beneath the active sun arc — lets the
686690
reader see the configured ±fov_left/right span at the same time as
@@ -697,7 +701,11 @@ export class SkyCompass extends LitElement {
697701
stroke: var(--primary-color);
698702
stroke-width: 1;
699703
stroke-opacity: 0.6;
700-
transition: all 0.3s ease;
704+
transition:
705+
fill 0.3s ease,
706+
fill-opacity 0.3s ease,
707+
stroke 0.3s ease,
708+
stroke-opacity 0.3s ease;
701709
}
702710
.blind-spot {
703711
fill: var(--error-color, crimson);
@@ -721,10 +729,7 @@ export class SkyCompass extends LitElement {
721729
}
722730
.sun {
723731
fill: var(--secondary-text-color);
724-
transition:
725-
cx 0.3s ease,
726-
cy 0.3s ease,
727-
fill 0.3s ease;
732+
transition: fill 0.3s ease;
728733
}
729734
.sun.up {
730735
fill: #ffe680;
@@ -876,9 +881,6 @@ export class SkyCompass extends LitElement {
876881
.moon-lit {
877882
fill: var(--secondary-text-color);
878883
opacity: 0.75;
879-
transition:
880-
cx 0.3s ease,
881-
cy 0.3s ease;
882884
}
883885
.dot.moon-dot {
884886
background: var(--secondary-text-color);

0 commit comments

Comments
 (0)