Refactor modules for consistency
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user