Mouse/touch event handling improvement
- prefer passive handlers - fix event moving on touch - faster selection updates
This commit is contained in:
@@ -14,9 +14,6 @@ export const useCalendarStore = defineStore('calendar', {
|
||||
today: toLocalString(new Date(), DEFAULT_TZ),
|
||||
now: new Date().toISOString(),
|
||||
events: new Map(),
|
||||
// Lightweight mutation counter so views can rebuild in a throttled / idle way
|
||||
// without tracking deep reactivity on every event object.
|
||||
eventsMutation: 0,
|
||||
// Incremented internally by history plugin to force reactive updates for canUndo/canRedo
|
||||
historyTick: 0,
|
||||
historyCanUndo: false,
|
||||
@@ -117,10 +114,7 @@ export const useCalendarStore = defineStore('calendar', {
|
||||
return 'e-' + Math.random().toString(36).slice(2, 10) + '-' + Date.now().toString(36)
|
||||
},
|
||||
|
||||
notifyEventsChanged() {
|
||||
// Bump simple counter (wrapping to avoid overflow in extreme long sessions)
|
||||
this.eventsMutation = (this.eventsMutation + 1) % 1_000_000_000
|
||||
},
|
||||
notifyEventsChanged() {},
|
||||
touchEvents() {
|
||||
this.notifyEventsChanged()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user