energy-visualization-sankey 1.0.21 → 1.0.23
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
|
@@ -7641,9 +7641,7 @@ class AnimationService {
|
|
|
7641
7641
|
animationServiceRef.updateSliderIndicator();
|
|
7642
7642
|
});
|
|
7643
7643
|
// Create timeline sliders
|
|
7644
|
-
|
|
7645
|
-
this.sliderWidth = rangeSliderElement ?
|
|
7646
|
-
rangeSliderElement.getBoundingClientRect().width : 1200;
|
|
7644
|
+
this.sliderWidth = this.configService.WIDTH;
|
|
7647
7645
|
// Top year labels
|
|
7648
7646
|
const svgTopYear = select('#evs-axis-top')
|
|
7649
7647
|
.style('margin', '-5px')
|
|
@@ -8164,8 +8162,10 @@ class AnimationService {
|
|
|
8164
8162
|
// Compute thumb center in viewport coordinates, then translate to offset-parent space.
|
|
8165
8163
|
// Using getBoundingClientRect differences means scroll position cancels out automatically.
|
|
8166
8164
|
const thumbCenterViewport = sliderRect.left + (thumbWidth / 2) + (progress * effectiveWidth);
|
|
8167
|
-
//
|
|
8168
|
-
|
|
8165
|
+
// Use the actual rendered width so centering is correct regardless of whether the host
|
|
8166
|
+
// project applies box-sizing: border-box (e.g. Nuxt/Vue resets) or content-box (plain HTML).
|
|
8167
|
+
// offsetWidth always reflects the true painted width including padding.
|
|
8168
|
+
const indicatorWidth = indicator.offsetWidth;
|
|
8169
8169
|
return (thumbCenterViewport - parentLeft) - (indicatorWidth / 2);
|
|
8170
8170
|
}
|
|
8171
8171
|
applyIndicatorPosition(indicator, position, year) {
|