react-native-resource-calendar 1.1.7 → 1.1.8

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 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 screenColumn = absoluteColIndex - leftmostColumnIndex;
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;