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.mjs CHANGED
@@ -1685,16 +1685,13 @@ var CalendarInner = (props) => {
1685
1685
  const days2 = daysRef.current;
1686
1686
  const APPOINTMENT_BLOCK_WIDTH2 = apptWidthRef.current;
1687
1687
  const isMultiDay2 = isMultiDayRef.current;
1688
- const EPS = 1e-4;
1689
- const leftmostColumnIndex = Math.max(0, Math.floor((scrollX.value + EPS) / APPOINTMENT_BLOCK_WIDTH2));
1690
1688
  let absoluteColIndex;
1691
1689
  if (!isMultiDay2) {
1692
1690
  absoluteColIndex = findResourceIndexFor(event.resourceId, resources2?.map((r) => r.id));
1693
1691
  } else {
1694
1692
  absoluteColIndex = findDayIndexFor(event.date, days2);
1695
1693
  }
1696
- const screenColumn = absoluteColIndex - leftmostColumnIndex;
1697
- const selectedAppointmentStartedX = TIME_LABEL_WIDTH + APPOINTMENT_BLOCK_WIDTH2 / 2 + APPOINTMENT_BLOCK_WIDTH2 * screenColumn;
1694
+ const selectedAppointmentStartedX = TIME_LABEL_WIDTH + APPOINTMENT_BLOCK_WIDTH2 * absoluteColIndex + APPOINTMENT_BLOCK_WIDTH2 / 2 - scrollX.value;
1698
1695
  panXAbs.value = selectedAppointmentStartedX;
1699
1696
  startedX.value = selectedAppointmentStartedX;
1700
1697
  lastHapticScrollY.value = scrollY.value;