Mouse/touch event handling improvement

- prefer passive handlers
- fix event moving on touch
- faster selection updates
This commit is contained in:
2025-08-27 20:04:29 +00:00
parent 1dcf4658bd
commit 45b95fc67c
6 changed files with 19 additions and 23 deletions
+1 -7
View File
@@ -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()
},