Refactor modules for consistency

This commit is contained in:
2025-08-27 21:09:19 +00:00
parent 5892897be2
commit de36829058
3 changed files with 40 additions and 39 deletions
+3 -9
View File
@@ -325,7 +325,7 @@ function onDragPointerMove(e) {
if (st.mode === 'move') {
if (st.n && st.n > 0) {
if (!st.realizedId) {
const newId = store.splitMoveVirtualOccurrence(st.id, st.startDate, ns, ne, st.n)
const newId = store.splitMoveVirtualOccurrence(st.id, ns, ne, st.n)
if (newId) {
st.realizedId = newId
st.id = newId
@@ -357,13 +357,7 @@ function onDragPointerMove(e) {
if (!st.realizedId) {
const initialStart = ns
const initialEnd = ne
const newId = store.splitMoveVirtualOccurrence(
st.id,
st.startDate,
initialStart,
initialEnd,
st.n,
)
const newId = store.splitMoveVirtualOccurrence(st.id, initialStart, initialEnd, st.n)
if (newId) {
st.realizedId = newId
st.id = newId
@@ -446,7 +440,7 @@ function applyRangeDuringDrag(st, startDate, endDate) {
if (st.n && st.n > 0) {
if (st.mode !== 'move') return // no resize for virtual occurrence
// Split-move: occurrence being dragged treated as first of new series
store.splitMoveVirtualOccurrence(st.id, st.startDate, startDate, endDate, st.n)
store.splitMoveVirtualOccurrence(st.id, startDate, endDate, st.n)
return
}
store.setEventRange(st.id, startDate, endDate, { mode: st.mode })