gifted-charts-core 0.0.12 → 0.0.13
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/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
BarAndLineChartsWrapperTypes,
|
|
5
5
|
horizSectionPropTypes,
|
|
6
6
|
} from "../../utils/types";
|
|
7
|
+
import { I18nManager } from "react-native";
|
|
7
8
|
|
|
8
9
|
export const useBarAndLineChartsWrapper = (
|
|
9
10
|
props: BarAndLineChartsWrapperTypes
|
|
@@ -317,18 +318,25 @@ export const useBarAndLineChartsWrapper = (
|
|
|
317
318
|
const [canMomentum, setCanMomentum] = useState(false);
|
|
318
319
|
|
|
319
320
|
const isCloseToEnd = ({ layoutMeasurement, contentOffset, contentSize }) => {
|
|
320
|
-
return
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
return I18nManager.isRTL
|
|
322
|
+
? contentOffset.x <= initialSpacing
|
|
323
|
+
: layoutMeasurement.width + contentOffset.x >=
|
|
324
|
+
contentSize.width - initialSpacing - endReachedOffset;
|
|
324
325
|
};
|
|
325
326
|
|
|
326
327
|
// const isCloseToStart = ({ layoutMeasurement, contentOffset }) => {
|
|
327
328
|
// return layoutMeasurement.width + contentOffset.x <= initialSpacing;
|
|
328
329
|
// };
|
|
329
330
|
|
|
330
|
-
const isCloseToStart = ({
|
|
331
|
-
|
|
331
|
+
const isCloseToStart = ({
|
|
332
|
+
layoutMeasurement,
|
|
333
|
+
contentOffset,
|
|
334
|
+
contentSize,
|
|
335
|
+
}) => {
|
|
336
|
+
return I18nManager.isRTL
|
|
337
|
+
? layoutMeasurement.width + contentOffset.x >=
|
|
338
|
+
contentSize.width - initialSpacing - endReachedOffset
|
|
339
|
+
: contentOffset.x <= initialSpacing;
|
|
332
340
|
};
|
|
333
341
|
|
|
334
342
|
useEffect(() => {
|