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.
package/dist/sankey.esm.js
CHANGED
|
@@ -8164,8 +8164,10 @@ class AnimationService {
|
|
|
8164
8164
|
// Compute thumb center in viewport coordinates, then translate to offset-parent space.
|
|
8165
8165
|
// Using getBoundingClientRect differences means scroll position cancels out automatically.
|
|
8166
8166
|
const thumbCenterViewport = sliderRect.left + (thumbWidth / 2) + (progress * effectiveWidth);
|
|
8167
|
-
//
|
|
8168
|
-
|
|
8167
|
+
// Use the actual rendered width so centering is correct regardless of whether the host
|
|
8168
|
+
// project applies box-sizing: border-box (e.g. Nuxt/Vue resets) or content-box (plain HTML).
|
|
8169
|
+
// offsetWidth always reflects the true painted width including padding.
|
|
8170
|
+
const indicatorWidth = indicator.offsetWidth;
|
|
8169
8171
|
return (thumbCenterViewport - parentLeft) - (indicatorWidth / 2);
|
|
8170
8172
|
}
|
|
8171
8173
|
applyIndicatorPosition(indicator, position, year) {
|