energy-visualization-sankey 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8170,8 +8170,10 @@
8170
8170
  // Compute thumb center in viewport coordinates, then translate to offset-parent space.
8171
8171
  // Using getBoundingClientRect differences means scroll position cancels out automatically.
8172
8172
  const thumbCenterViewport = sliderRect.left + (thumbWidth / 2) + (progress * effectiveWidth);
8173
- // Indicator rendered width = 50px (width) + 5px + 5px (padding-left/right) = 60px (content-box).
8174
- const indicatorWidth = 60;
8173
+ // Use the actual rendered width so centering is correct regardless of whether the host
8174
+ // project applies box-sizing: border-box (e.g. Nuxt/Vue resets) or content-box (plain HTML).
8175
+ // offsetWidth always reflects the true painted width including padding.
8176
+ const indicatorWidth = indicator.offsetWidth;
8175
8177
  return (thumbCenterViewport - parentLeft) - (indicatorWidth / 2);
8176
8178
  }
8177
8179
  applyIndicatorPosition(indicator, position, year) {