Skip to content

Commit 9ff6d5c

Browse files
committed
Limit subtitle scrolling to LTR
1 parent 7d7fd08 commit 9ff6d5c

2 files changed

Lines changed: 2 additions & 16 deletions

File tree

dist/homeii-music-flow.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11712,7 +11712,7 @@ class HomeiiBaseMusicCard extends HTMLElement {
1171211712
const el = this.$("npSub");
1171311713
if (!el) return;
1171411714
const text = String(value || "—");
11715-
const shouldScroll = !!scrollWhenOverflow;
11715+
const shouldScroll = !!scrollWhenOverflow && !this._isHebrew();
1171611716
const existingInner = el.querySelector?.(".scrolling-text-inner");
1171711717
const unchanged = el.dataset.homeiiSubtitleText === text
1171811718
&& el.dataset.homeiiSubtitleScroll === String(shouldScroll)
@@ -24377,17 +24377,10 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard {
2437724377
animation:homeiiSubtitleScroll var(--scroll-duration, 12s) linear infinite;
2437824378
will-change:transform;
2437924379
}
24380-
.card.rtl .np-sub.scroll-when-overflow.is-overflowing .scrolling-text-inner {
24381-
animation-name:homeiiSubtitleScrollRtl;
24382-
}
2438324380
@keyframes homeiiSubtitleScroll {
2438424381
from { transform:translateX(0); }
2438524382
to { transform:translateX(calc(-1 * var(--scroll-distance, 0px))); }
2438624383
}
24387-
@keyframes homeiiSubtitleScrollRtl {
24388-
from { transform:translateX(0); }
24389-
to { transform:translateX(var(--scroll-distance, 0px)); }
24390-
}
2439124384
@media (prefers-reduced-motion: reduce) {
2439224385
.np-sub.scroll-when-overflow {
2439324386
text-overflow:ellipsis;

src/homeii-music-flow.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11712,7 +11712,7 @@ class HomeiiBaseMusicCard extends HTMLElement {
1171211712
const el = this.$("npSub");
1171311713
if (!el) return;
1171411714
const text = String(value || "—");
11715-
const shouldScroll = !!scrollWhenOverflow;
11715+
const shouldScroll = !!scrollWhenOverflow && !this._isHebrew();
1171611716
const existingInner = el.querySelector?.(".scrolling-text-inner");
1171711717
const unchanged = el.dataset.homeiiSubtitleText === text
1171811718
&& el.dataset.homeiiSubtitleScroll === String(shouldScroll)
@@ -24377,17 +24377,10 @@ class HomeiiMusicFlowBaseCard extends HomeiiBaseMusicCard {
2437724377
animation:homeiiSubtitleScroll var(--scroll-duration, 12s) linear infinite;
2437824378
will-change:transform;
2437924379
}
24380-
.card.rtl .np-sub.scroll-when-overflow.is-overflowing .scrolling-text-inner {
24381-
animation-name:homeiiSubtitleScrollRtl;
24382-
}
2438324380
@keyframes homeiiSubtitleScroll {
2438424381
from { transform:translateX(0); }
2438524382
to { transform:translateX(calc(-1 * var(--scroll-distance, 0px))); }
2438624383
}
24387-
@keyframes homeiiSubtitleScrollRtl {
24388-
from { transform:translateX(0); }
24389-
to { transform:translateX(var(--scroll-distance, 0px)); }
24390-
}
2439124384
@media (prefers-reduced-motion: reduce) {
2439224385
.np-sub.scroll-when-overflow {
2439324386
text-overflow:ellipsis;

0 commit comments

Comments
 (0)