react-native-resource-calendar 1.1.7 → 1.1.9
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/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1710,16 +1710,13 @@ var CalendarInner = (props) => {
|
|
|
1710
1710
|
const days2 = daysRef.current;
|
|
1711
1711
|
const APPOINTMENT_BLOCK_WIDTH2 = apptWidthRef.current;
|
|
1712
1712
|
const isMultiDay2 = isMultiDayRef.current;
|
|
1713
|
-
const EPS = 1e-4;
|
|
1714
|
-
const leftmostColumnIndex = Math.max(0, Math.floor((scrollX.value + EPS) / APPOINTMENT_BLOCK_WIDTH2));
|
|
1715
1713
|
let absoluteColIndex;
|
|
1716
1714
|
if (!isMultiDay2) {
|
|
1717
1715
|
absoluteColIndex = findResourceIndexFor(event.resourceId, resources2?.map((r) => r.id));
|
|
1718
1716
|
} else {
|
|
1719
1717
|
absoluteColIndex = findDayIndexFor(event.date, days2);
|
|
1720
1718
|
}
|
|
1721
|
-
const
|
|
1722
|
-
const selectedAppointmentStartedX = TIME_LABEL_WIDTH + APPOINTMENT_BLOCK_WIDTH2 / 2 + APPOINTMENT_BLOCK_WIDTH2 * screenColumn;
|
|
1719
|
+
const selectedAppointmentStartedX = TIME_LABEL_WIDTH + APPOINTMENT_BLOCK_WIDTH2 * absoluteColIndex + APPOINTMENT_BLOCK_WIDTH2 / 2 - scrollX.value;
|
|
1723
1720
|
panXAbs.value = selectedAppointmentStartedX;
|
|
1724
1721
|
startedX.value = selectedAppointmentStartedX;
|
|
1725
1722
|
lastHapticScrollY.value = scrollY.value;
|
|
@@ -1885,7 +1882,7 @@ var CalendarInner = (props) => {
|
|
|
1885
1882
|
top: 0,
|
|
1886
1883
|
left: TIME_LABEL_WIDTH,
|
|
1887
1884
|
paddingLeft: TIME_LABEL_WIDTH,
|
|
1888
|
-
width: width - TIME_LABEL_WIDTH,
|
|
1885
|
+
width: (layout?.width ?? width) - TIME_LABEL_WIDTH,
|
|
1889
1886
|
height: "100%",
|
|
1890
1887
|
backgroundColor: "rgba(0, 0, 0, 0.1)",
|
|
1891
1888
|
zIndex: 1
|