client: fix init order for custom events (migration side effect)

This commit is contained in:
jean-emmanuel 2025-09-12 20:10:51 +02:00
parent 7e69d7d9d0
commit 00a6428b9f
2 changed files with 20 additions and 13 deletions

View file

@ -1,17 +1,20 @@
import domEvent from './dom-event.mjs'
import * as drag from './drag.mjs'
import * as resize from './resize.mjs'
var customEvents = {}
;(async()=>{
customEvents['draginit'] = customEvents['drag'] = customEvents['dragend'] = await import('./drag.mjs')
customEvents['resize'] = await import('./resize')
customEvents['wheel'] = domEvent('wheel')
customEvents['scroll'] = domEvent('scroll', {capture: true})
customEvents['click'] = domEvent('click')
customEvents['fast-click'] = domEvent('fast-click')
customEvents['focus'] = domEvent('focus', {capture: true})
customEvents['blur'] = domEvent('blur', {capture: true})
customEvents['change'] = domEvent('change.mjs')
})()
var customEvents = {
'draginit': drag,
'drag': drag,
'dragend': drag,
'resize': resize,
'wheel': domEvent('wheel'),
'scroll': domEvent('scroll', {capture: true}),
'click': domEvent('click'),
'fast-click': domEvent('fast-click'),
'focus': domEvent('focus', {capture: true}),
'blur': domEvent('blur', {capture: true}),
'change': domEvent('change.mjs')
}
// micro optimisation from eventemitter3
var has = Object.prototype.hasOwnProperty

View file

@ -1,4 +1,8 @@
import zoom from '../ui/zoom.mjs'
var zoom
;(async()=>{
zoom = (await import('../ui/zoom')).default
})()
// impot cssTransformCoords from './transform-coords.mjs'
const Touch = window.Touch || class Touch {}