rbro-tat-uds 2.2.0 → 2.2.1
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.
@@ -92,12 +92,19 @@ const UnitLinkGraph = ({
|
|
92
92
|
const sliderActive = React.useMemo(() => {
|
93
93
|
return barSecondaryConfiguration ? true : false;
|
94
94
|
}, [barSecondaryConfiguration]);
|
95
|
+
const refMemoMaximumAni = React.useRef(maximum_ani);
|
95
96
|
const svgReference = React.useRef(null);
|
96
97
|
const [totalWidth, setTotalWidth] = React.useState(0);
|
97
98
|
const [totalHeight, setTotalHeight] = React.useState(height);
|
98
99
|
const [mainWidth, setMainWidth] = React.useState(0);
|
99
100
|
const [mainStart, setMainStart] = React.useState(0);
|
100
101
|
const [sliderValue, setSliderValue] = React.useState(initialSliderValue);
|
102
|
+
React.useEffect(() => {
|
103
|
+
if (refMemoMaximumAni.current !== maximum_ani) {
|
104
|
+
setSliderValue(0);
|
105
|
+
refMemoMaximumAni.current = maximum_ani;
|
106
|
+
}
|
107
|
+
}, [refMemoMaximumAni, maximum_ani]);
|
101
108
|
const place_at_ani = React.useMemo(() => {
|
102
109
|
if (barMainConfiguration.followSlider) {
|
103
110
|
return sliderValue;
|
@@ -385,7 +392,14 @@ const UnitLinkGraph = ({
|
|
385
392
|
}
|
386
393
|
};
|
387
394
|
},
|
388
|
-
[
|
395
|
+
[
|
396
|
+
mainWidth,
|
397
|
+
mainStart,
|
398
|
+
configurations,
|
399
|
+
totalHeight,
|
400
|
+
place_at_ani,
|
401
|
+
maximum_ani
|
402
|
+
]
|
389
403
|
);
|
390
404
|
const computeAction = React.useCallback(
|
391
405
|
({
|
@@ -787,6 +801,7 @@ const RenderSlider = ({
|
|
787
801
|
}) => {
|
788
802
|
const PADDING_Y = 13;
|
789
803
|
const GAP_TIMELINE_ACTIONS = 10;
|
804
|
+
const refMemoMax = React.useRef(max);
|
790
805
|
const [internalValue, setInternalValue] = React.useState(externalValue || min);
|
791
806
|
const [isDragging, setIsDragging] = React.useState(false);
|
792
807
|
const sliderRef = React.useRef(null);
|
@@ -867,7 +882,8 @@ const RenderSlider = ({
|
|
867
882
|
const trackWidth = sliderPosition.w;
|
868
883
|
const normalizeValue = (internalValue - min) / (max - min);
|
869
884
|
const x = normalizeValue * trackWidth + sliderPosition.x;
|
870
|
-
|
885
|
+
const calculateX = x - thumbRenderProperties.w / 2 + 2;
|
886
|
+
return calculateX;
|
871
887
|
}, [
|
872
888
|
min,
|
873
889
|
max,
|
@@ -890,6 +906,12 @@ const RenderSlider = ({
|
|
890
906
|
window.removeEventListener("touchend", onTouchEnd);
|
891
907
|
};
|
892
908
|
}, [isDragging, onMouseMove, onMouseUp, onTouchMove, onTouchEnd]);
|
909
|
+
React.useEffect(() => {
|
910
|
+
if (refMemoMax.current !== max) {
|
911
|
+
setInternalValue(0);
|
912
|
+
refMemoMax.current = max;
|
913
|
+
}
|
914
|
+
}, [refMemoMax, max]);
|
893
915
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
894
916
|
/* @__PURE__ */ jsxRuntime.jsx(
|
895
917
|
"rect",
|
@@ -922,7 +944,7 @@ const RenderSlider = ({
|
|
922
944
|
fill: utils.colors.info_600
|
923
945
|
}
|
924
946
|
),
|
925
|
-
internalValue
|
947
|
+
internalValue > min && internalValue < max && /* @__PURE__ */ jsxRuntime.jsxs(
|
926
948
|
"text",
|
927
949
|
{
|
928
950
|
x: thumbRenderProperties.w / 2,
|
package/build/cjs/index.cjs
CHANGED
@@ -24489,12 +24489,19 @@ const UnitLinkGraph = ({
|
|
24489
24489
|
const sliderActive = React.useMemo(() => {
|
24490
24490
|
return barSecondaryConfiguration ? true : false;
|
24491
24491
|
}, [barSecondaryConfiguration]);
|
24492
|
+
const refMemoMaximumAni = React.useRef(maximum_ani);
|
24492
24493
|
const svgReference = React.useRef(null);
|
24493
24494
|
const [totalWidth, setTotalWidth] = React.useState(0);
|
24494
24495
|
const [totalHeight, setTotalHeight] = React.useState(height);
|
24495
24496
|
const [mainWidth, setMainWidth] = React.useState(0);
|
24496
24497
|
const [mainStart, setMainStart] = React.useState(0);
|
24497
24498
|
const [sliderValue, setSliderValue] = React.useState(initialSliderValue);
|
24499
|
+
React.useEffect(() => {
|
24500
|
+
if (refMemoMaximumAni.current !== maximum_ani) {
|
24501
|
+
setSliderValue(0);
|
24502
|
+
refMemoMaximumAni.current = maximum_ani;
|
24503
|
+
}
|
24504
|
+
}, [refMemoMaximumAni, maximum_ani]);
|
24498
24505
|
const place_at_ani = React.useMemo(() => {
|
24499
24506
|
if (barMainConfiguration.followSlider) {
|
24500
24507
|
return sliderValue;
|
@@ -24782,7 +24789,14 @@ const UnitLinkGraph = ({
|
|
24782
24789
|
}
|
24783
24790
|
};
|
24784
24791
|
},
|
24785
|
-
[
|
24792
|
+
[
|
24793
|
+
mainWidth,
|
24794
|
+
mainStart,
|
24795
|
+
configurations,
|
24796
|
+
totalHeight,
|
24797
|
+
place_at_ani,
|
24798
|
+
maximum_ani
|
24799
|
+
]
|
24786
24800
|
);
|
24787
24801
|
const computeAction = React.useCallback(
|
24788
24802
|
({
|
@@ -25184,6 +25198,7 @@ const RenderSlider = ({
|
|
25184
25198
|
}) => {
|
25185
25199
|
const PADDING_Y = 13;
|
25186
25200
|
const GAP_TIMELINE_ACTIONS = 10;
|
25201
|
+
const refMemoMax = React.useRef(max);
|
25187
25202
|
const [internalValue, setInternalValue] = React.useState(externalValue || min);
|
25188
25203
|
const [isDragging, setIsDragging] = React.useState(false);
|
25189
25204
|
const sliderRef = React.useRef(null);
|
@@ -25264,7 +25279,8 @@ const RenderSlider = ({
|
|
25264
25279
|
const trackWidth = sliderPosition.w;
|
25265
25280
|
const normalizeValue = (internalValue - min) / (max - min);
|
25266
25281
|
const x = normalizeValue * trackWidth + sliderPosition.x;
|
25267
|
-
|
25282
|
+
const calculateX = x - thumbRenderProperties.w / 2 + 2;
|
25283
|
+
return calculateX;
|
25268
25284
|
}, [
|
25269
25285
|
min,
|
25270
25286
|
max,
|
@@ -25287,6 +25303,12 @@ const RenderSlider = ({
|
|
25287
25303
|
window.removeEventListener("touchend", onTouchEnd);
|
25288
25304
|
};
|
25289
25305
|
}, [isDragging, onMouseMove, onMouseUp, onTouchMove, onTouchEnd]);
|
25306
|
+
React.useEffect(() => {
|
25307
|
+
if (refMemoMax.current !== max) {
|
25308
|
+
setInternalValue(0);
|
25309
|
+
refMemoMax.current = max;
|
25310
|
+
}
|
25311
|
+
}, [refMemoMax, max]);
|
25290
25312
|
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
25291
25313
|
/* @__PURE__ */ jsxRuntime.jsx(
|
25292
25314
|
"rect",
|
@@ -25319,7 +25341,7 @@ const RenderSlider = ({
|
|
25319
25341
|
fill: utils.colors.info_600
|
25320
25342
|
}
|
25321
25343
|
),
|
25322
|
-
internalValue
|
25344
|
+
internalValue > min && internalValue < max && /* @__PURE__ */ jsxRuntime.jsxs(
|
25323
25345
|
"text",
|
25324
25346
|
{
|
25325
25347
|
x: thumbRenderProperties.w / 2,
|
@@ -88,12 +88,19 @@ const UnitLinkGraph = ({
|
|
88
88
|
const sliderActive = useMemo(() => {
|
89
89
|
return barSecondaryConfiguration ? true : false;
|
90
90
|
}, [barSecondaryConfiguration]);
|
91
|
+
const refMemoMaximumAni = useRef(maximum_ani);
|
91
92
|
const svgReference = useRef(null);
|
92
93
|
const [totalWidth, setTotalWidth] = useState(0);
|
93
94
|
const [totalHeight, setTotalHeight] = useState(height);
|
94
95
|
const [mainWidth, setMainWidth] = useState(0);
|
95
96
|
const [mainStart, setMainStart] = useState(0);
|
96
97
|
const [sliderValue, setSliderValue] = useState(initialSliderValue);
|
98
|
+
useEffect(() => {
|
99
|
+
if (refMemoMaximumAni.current !== maximum_ani) {
|
100
|
+
setSliderValue(0);
|
101
|
+
refMemoMaximumAni.current = maximum_ani;
|
102
|
+
}
|
103
|
+
}, [refMemoMaximumAni, maximum_ani]);
|
97
104
|
const place_at_ani = useMemo(() => {
|
98
105
|
if (barMainConfiguration.followSlider) {
|
99
106
|
return sliderValue;
|
@@ -381,7 +388,14 @@ const UnitLinkGraph = ({
|
|
381
388
|
}
|
382
389
|
};
|
383
390
|
},
|
384
|
-
[
|
391
|
+
[
|
392
|
+
mainWidth,
|
393
|
+
mainStart,
|
394
|
+
configurations,
|
395
|
+
totalHeight,
|
396
|
+
place_at_ani,
|
397
|
+
maximum_ani
|
398
|
+
]
|
385
399
|
);
|
386
400
|
const computeAction = useCallback(
|
387
401
|
({
|
@@ -783,6 +797,7 @@ const RenderSlider = ({
|
|
783
797
|
}) => {
|
784
798
|
const PADDING_Y = 13;
|
785
799
|
const GAP_TIMELINE_ACTIONS = 10;
|
800
|
+
const refMemoMax = useRef(max);
|
786
801
|
const [internalValue, setInternalValue] = useState(externalValue || min);
|
787
802
|
const [isDragging, setIsDragging] = useState(false);
|
788
803
|
const sliderRef = useRef(null);
|
@@ -863,7 +878,8 @@ const RenderSlider = ({
|
|
863
878
|
const trackWidth = sliderPosition.w;
|
864
879
|
const normalizeValue = (internalValue - min) / (max - min);
|
865
880
|
const x = normalizeValue * trackWidth + sliderPosition.x;
|
866
|
-
|
881
|
+
const calculateX = x - thumbRenderProperties.w / 2 + 2;
|
882
|
+
return calculateX;
|
867
883
|
}, [
|
868
884
|
min,
|
869
885
|
max,
|
@@ -886,6 +902,12 @@ const RenderSlider = ({
|
|
886
902
|
window.removeEventListener("touchend", onTouchEnd);
|
887
903
|
};
|
888
904
|
}, [isDragging, onMouseMove, onMouseUp, onTouchMove, onTouchEnd]);
|
905
|
+
useEffect(() => {
|
906
|
+
if (refMemoMax.current !== max) {
|
907
|
+
setInternalValue(0);
|
908
|
+
refMemoMax.current = max;
|
909
|
+
}
|
910
|
+
}, [refMemoMax, max]);
|
889
911
|
return /* @__PURE__ */ jsxs("g", { children: [
|
890
912
|
/* @__PURE__ */ jsx(
|
891
913
|
"rect",
|
@@ -918,7 +940,7 @@ const RenderSlider = ({
|
|
918
940
|
fill: colors.info_600
|
919
941
|
}
|
920
942
|
),
|
921
|
-
internalValue
|
943
|
+
internalValue > min && internalValue < max && /* @__PURE__ */ jsxs(
|
922
944
|
"text",
|
923
945
|
{
|
924
946
|
x: thumbRenderProperties.w / 2,
|
package/build/esm/index.js
CHANGED
@@ -24466,12 +24466,19 @@ const UnitLinkGraph = ({
|
|
24466
24466
|
const sliderActive = useMemo(() => {
|
24467
24467
|
return barSecondaryConfiguration ? true : false;
|
24468
24468
|
}, [barSecondaryConfiguration]);
|
24469
|
+
const refMemoMaximumAni = useRef(maximum_ani);
|
24469
24470
|
const svgReference = useRef(null);
|
24470
24471
|
const [totalWidth, setTotalWidth] = useState(0);
|
24471
24472
|
const [totalHeight, setTotalHeight] = useState(height);
|
24472
24473
|
const [mainWidth, setMainWidth] = useState(0);
|
24473
24474
|
const [mainStart, setMainStart] = useState(0);
|
24474
24475
|
const [sliderValue, setSliderValue] = useState(initialSliderValue);
|
24476
|
+
useEffect(() => {
|
24477
|
+
if (refMemoMaximumAni.current !== maximum_ani) {
|
24478
|
+
setSliderValue(0);
|
24479
|
+
refMemoMaximumAni.current = maximum_ani;
|
24480
|
+
}
|
24481
|
+
}, [refMemoMaximumAni, maximum_ani]);
|
24475
24482
|
const place_at_ani = useMemo(() => {
|
24476
24483
|
if (barMainConfiguration.followSlider) {
|
24477
24484
|
return sliderValue;
|
@@ -24759,7 +24766,14 @@ const UnitLinkGraph = ({
|
|
24759
24766
|
}
|
24760
24767
|
};
|
24761
24768
|
},
|
24762
|
-
[
|
24769
|
+
[
|
24770
|
+
mainWidth,
|
24771
|
+
mainStart,
|
24772
|
+
configurations,
|
24773
|
+
totalHeight,
|
24774
|
+
place_at_ani,
|
24775
|
+
maximum_ani
|
24776
|
+
]
|
24763
24777
|
);
|
24764
24778
|
const computeAction = useCallback(
|
24765
24779
|
({
|
@@ -25161,6 +25175,7 @@ const RenderSlider = ({
|
|
25161
25175
|
}) => {
|
25162
25176
|
const PADDING_Y = 13;
|
25163
25177
|
const GAP_TIMELINE_ACTIONS = 10;
|
25178
|
+
const refMemoMax = useRef(max);
|
25164
25179
|
const [internalValue, setInternalValue] = useState(externalValue || min);
|
25165
25180
|
const [isDragging, setIsDragging] = useState(false);
|
25166
25181
|
const sliderRef = useRef(null);
|
@@ -25241,7 +25256,8 @@ const RenderSlider = ({
|
|
25241
25256
|
const trackWidth = sliderPosition.w;
|
25242
25257
|
const normalizeValue = (internalValue - min) / (max - min);
|
25243
25258
|
const x = normalizeValue * trackWidth + sliderPosition.x;
|
25244
|
-
|
25259
|
+
const calculateX = x - thumbRenderProperties.w / 2 + 2;
|
25260
|
+
return calculateX;
|
25245
25261
|
}, [
|
25246
25262
|
min,
|
25247
25263
|
max,
|
@@ -25264,6 +25280,12 @@ const RenderSlider = ({
|
|
25264
25280
|
window.removeEventListener("touchend", onTouchEnd);
|
25265
25281
|
};
|
25266
25282
|
}, [isDragging, onMouseMove, onMouseUp, onTouchMove, onTouchEnd]);
|
25283
|
+
useEffect(() => {
|
25284
|
+
if (refMemoMax.current !== max) {
|
25285
|
+
setInternalValue(0);
|
25286
|
+
refMemoMax.current = max;
|
25287
|
+
}
|
25288
|
+
}, [refMemoMax, max]);
|
25267
25289
|
return /* @__PURE__ */ jsxs("g", { children: [
|
25268
25290
|
/* @__PURE__ */ jsx(
|
25269
25291
|
"rect",
|
@@ -25296,7 +25318,7 @@ const RenderSlider = ({
|
|
25296
25318
|
fill: colors.info_600
|
25297
25319
|
}
|
25298
25320
|
),
|
25299
|
-
internalValue
|
25321
|
+
internalValue > min && internalValue < max && /* @__PURE__ */ jsxs(
|
25300
25322
|
"text",
|
25301
25323
|
{
|
25302
25324
|
x: thumbRenderProperties.w / 2,
|