Fix resizing repeat events non-first occurrence.
This commit is contained in:
parent
e15f4aadca
commit
467a984955
@ -299,6 +299,19 @@ function onDragPointerMove(e) {
|
|||||||
ns,
|
ns,
|
||||||
ne,
|
ne,
|
||||||
)
|
)
|
||||||
|
} else if (st.isVirtual && (st.mode === 'resize-left' || st.mode === 'resize-right')) {
|
||||||
|
// For virtual occurrence resize: convert to real once, then adjust range
|
||||||
|
if (!st.realizedId) {
|
||||||
|
const newId = store.splitMoveVirtualOccurrence(st.id, st.startDate, st.startDate, st.endDate)
|
||||||
|
if (newId) {
|
||||||
|
st.realizedId = newId
|
||||||
|
st.id = newId
|
||||||
|
st.isVirtual = false
|
||||||
|
} else return
|
||||||
|
}
|
||||||
|
// Apply range change; rotate if left edge moved and weekday changed
|
||||||
|
const rotate = st.mode === 'resize-left'
|
||||||
|
store.setEventRange(st.id, ns, ne, { mode: st.mode, rotatePattern: rotate })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,8 +286,8 @@ export const useCalendarStore = defineStore('calendar', {
|
|||||||
DEFAULT_TZ,
|
DEFAULT_TZ,
|
||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
mode === 'move' &&
|
|
||||||
rotatePattern &&
|
rotatePattern &&
|
||||||
|
(mode === 'move' || mode === 'resize-left') &&
|
||||||
snapshot.isRepeating &&
|
snapshot.isRepeating &&
|
||||||
snapshot.repeat === 'weeks' &&
|
snapshot.repeat === 'weeks' &&
|
||||||
Array.isArray(snapshot.repeatWeekdays)
|
Array.isArray(snapshot.repeatWeekdays)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user