Skip to content

Commit 2fb555a

Browse files
authored
cleanup css animation settings
1 parent ea144c6 commit 2fb555a

File tree

1 file changed

+24
-29
lines changed
  • packages/modules/web_themes/koala/source/src/components/charts/energyFlowChart

1 file changed

+24
-29
lines changed

packages/modules/web_themes/koala/source/src/components/charts/energyFlowChart/EnergyFlowChart.vue

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ const chargePointSumCharging = computed(
245245
///////////////////// Set animation speed //////////////////////////
246246
247247
const powerCategory = (power: number) => {
248-
if (Math.abs(power) >= 5000) return 'large';
249-
if (Math.abs(power) >= 1500) return 'medium';
250-
return 'small';
248+
if (Math.abs(power) >= 5000) return 'large';
249+
if (Math.abs(power) >= 1500) return 'medium';
250+
return 'small';
251251
};
252252
253253
const pvPowerCategory = computed(() => powerCategory(pvPower.value.value));
@@ -748,13 +748,11 @@ const svgRectWidth = computed(
748748
user-select: none;
749749
}
750750
751-
/* ------ */
752751
svg {
753752
width: 100%;
754753
height: 100%;
755754
object-fit: contain;
756755
}
757-
/* ------ */
758756
759757
path {
760758
fill: none;
@@ -770,28 +768,43 @@ path {
770768
path.animated {
771769
stroke: var(--q-white);
772770
stroke-dasharray: 5;
773-
animation: dash 1s linear infinite;
771+
animation: dash 3.5s linear infinite;
774772
}
775773
776774
path.animatedReverse {
777775
stroke: var(--q-white);
778776
stroke-dasharray: 5;
779-
animation: dashReverse 1s linear infinite;
777+
animation: dashReverse 3.5s linear infinite;
780778
}
781779
782-
path.small.animated,
783-
path.small.animatedReverse {
784-
animation-duration: 3.5s;
785-
}
786780
path.medium.animated,
787781
path.medium.animatedReverse {
788782
animation-duration: 1.5s;
789783
}
784+
790785
path.large.animated,
791786
path.large.animatedReverse {
792787
animation-duration: 0.6s;
793788
}
794789
790+
@keyframes dash {
791+
from {
792+
stroke-dashoffset: 10;
793+
}
794+
to {
795+
stroke-dashoffset: 0;
796+
}
797+
}
798+
799+
@keyframes dashReverse {
800+
from {
801+
stroke-dashoffset: 0;
802+
}
803+
to {
804+
stroke-dashoffset: 10;
805+
}
806+
}
807+
795808
path.animated.grid {
796809
stroke: var(--q-negative);
797810
}
@@ -858,24 +871,6 @@ rect {
858871
}
859872
}
860873
861-
@keyframes dash {
862-
from {
863-
stroke-dashoffset: 20;
864-
}
865-
to {
866-
stroke-dashoffset: 0;
867-
}
868-
}
869-
870-
@keyframes dashReverse {
871-
from {
872-
stroke-dashoffset: 0;
873-
}
874-
to {
875-
stroke-dashoffset: 20;
876-
}
877-
}
878-
879874
text {
880875
font-size: v-bind(svgFontSize);
881876
line-height: 1.25;

0 commit comments

Comments
 (0)