Skip to content

Commit e0f1ea9

Browse files
committed
fix(lcards-slider): update gauge band range rendering logic for improved component support
1 parent 637be12 commit e0f1ea9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cards/lcards-slider.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,9 +2855,11 @@ export class LCARdSSlider extends LCARdSButton {
28552855
}
28562856

28572857
// Inject gauge band ranges into #range-zone (bottom-most layer, always below ticks /
2858-
// progress bar / indicators). Only for the default component — Picard and other
2859-
// advanced components render their own range zones inside their render() function.
2860-
if (effectiveMode === 'gauge' && componentName === 'default' && rangeZone) {
2858+
// progress bar / indicators). Done for any component that declares a #range-zone —
2859+
// both 'default' and 'picard' have one; unknown/future components get it too if they
2860+
// declare the zone. skipRanges=true was passed to _generateGaugeContent() above so
2861+
// ranges are never also rendered inside the track-zone SVG.
2862+
if (effectiveMode === 'gauge' && rangeZone) {
28612863
const rangeZoneEl = shellElement.querySelector('#range-zone');
28622864
if (rangeZoneEl) {
28632865
rangeZoneEl.innerHTML = this._generateGaugeBandRanges(rangeZone.width, rangeZone.height);

0 commit comments

Comments
 (0)