@rfkit/charts 1.1.34 → 1.1.36
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/index.js +24 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4542,7 +4542,7 @@ const Container = (props)=>{
|
|
|
4542
4542
|
let first = true;
|
|
4543
4543
|
resizeObserver = new ResizeObserver(()=>{
|
|
4544
4544
|
if (!first) (0, utils.uA)(()=>{
|
|
4545
|
-
PUB_SUB(globalID)({
|
|
4545
|
+
if (ref.current.offsetHeight && ref.current.offsetWidth) PUB_SUB(globalID)({
|
|
4546
4546
|
pstype: constants_PSType.Resize
|
|
4547
4547
|
});
|
|
4548
4548
|
})();
|
|
@@ -6895,8 +6895,13 @@ const GuageBox = ({ children, padding, limit, step, setLimit, onChange })=>{
|
|
|
6895
6895
|
toLimit
|
|
6896
6896
|
]);
|
|
6897
6897
|
const handleMouseUpOrLeave = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)(()=>{
|
|
6898
|
+
if (down) onChange?.(limit);
|
|
6898
6899
|
setDown(false);
|
|
6899
|
-
}, [
|
|
6900
|
+
}, [
|
|
6901
|
+
down,
|
|
6902
|
+
limit,
|
|
6903
|
+
onChange
|
|
6904
|
+
]);
|
|
6900
6905
|
const handleMouseMove = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((e)=>{
|
|
6901
6906
|
if (down) toLimit(e);
|
|
6902
6907
|
}, [
|
|
@@ -6907,17 +6912,14 @@ const GuageBox = ({ children, padding, limit, step, setLimit, onChange })=>{
|
|
|
6907
6912
|
let newLimit = limit + (e.deltaY > 0 ? -step : step);
|
|
6908
6913
|
newLimit = Math.max(min, Math.min(max, newLimit));
|
|
6909
6914
|
setLimit(newLimit);
|
|
6915
|
+
onChange?.(newLimit);
|
|
6910
6916
|
}, [
|
|
6911
6917
|
step,
|
|
6912
6918
|
limit,
|
|
6913
6919
|
min,
|
|
6914
6920
|
max,
|
|
6915
|
-
setLimit
|
|
6916
|
-
|
|
6917
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
6918
|
-
onChange?.(limit);
|
|
6919
|
-
}, [
|
|
6920
|
-
limit
|
|
6921
|
+
setLimit,
|
|
6922
|
+
onChange
|
|
6921
6923
|
]);
|
|
6922
6924
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
6923
6925
|
className: components_GuageBox_styles_module.GuageBox,
|
|
@@ -9596,6 +9598,7 @@ class Spectrum {
|
|
|
9596
9598
|
useRangeAutoFocus(this.state.globalID)();
|
|
9597
9599
|
};
|
|
9598
9600
|
useRangeSet(this.state.globalID, (range)=>{
|
|
9601
|
+
this.state.renderRange = range;
|
|
9599
9602
|
this.state.chart?.setRange(range);
|
|
9600
9603
|
});
|
|
9601
9604
|
}
|
|
@@ -15496,6 +15499,19 @@ function useSpectrumChartType({ type, heatmapElementID }) {
|
|
|
15496
15499
|
0,
|
|
15497
15500
|
1
|
|
15498
15501
|
];
|
|
15502
|
+
axisY.realRange = [
|
|
15503
|
+
0,
|
|
15504
|
+
1
|
|
15505
|
+
];
|
|
15506
|
+
axisY.renderRange = [
|
|
15507
|
+
0,
|
|
15508
|
+
1
|
|
15509
|
+
];
|
|
15510
|
+
dispatch({
|
|
15511
|
+
payload: {
|
|
15512
|
+
axisY
|
|
15513
|
+
}
|
|
15514
|
+
});
|
|
15499
15515
|
useRangeSet(globalID)(axisY.range);
|
|
15500
15516
|
}
|
|
15501
15517
|
}
|