Major new version #2
@ -51,6 +51,19 @@ const selection = ref({ startDate: null, dayCount: 0 })
|
||||
const isDragging = ref(false)
|
||||
const dragAnchor = ref(null)
|
||||
|
||||
// Rebuild visible weeks whenever selection changes so day.isSelected stays in sync.
|
||||
watch(
|
||||
() => [selection.value.startDate, selection.value.dayCount],
|
||||
() => {
|
||||
// Skip if no selection (both null/0) to avoid unnecessary work.
|
||||
if (!selection.value.startDate || selection.value.dayCount === 0) {
|
||||
scheduleRebuild('selection-clear')
|
||||
} else {
|
||||
scheduleRebuild('selection')
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const DOUBLE_TAP_DELAY = 300
|
||||
const pendingTap = ref({ date: null, time: 0, type: null })
|
||||
const suppressMouseUntil = ref(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user