jjb-lc-designable
Version:
基于alibaba-designable源码二次封装的表单设计器。
31 lines (28 loc) • 810 B
text/typescript
import { IEngineContext } from '../../types'
import { globalThisPolyfill } from 'jjb-lc-designable/shared'
export interface IViewportEventData {
scrollX: number
scrollY: number
width: number
height: number
view: Window
innerWidth: number
innerHeight: number
target: EventTarget
}
export class AbstractViewportEvent {
data: IViewportEventData
context: IEngineContext
constructor(data: IViewportEventData) {
this.data = data || {
scrollX: globalThisPolyfill.scrollX,
scrollY: globalThisPolyfill.scrollY,
width: globalThisPolyfill.innerWidth,
height: globalThisPolyfill.innerHeight,
innerWidth: globalThisPolyfill.innerWidth,
innerHeight: globalThisPolyfill.innerHeight,
view: globalThisPolyfill,
target: globalThisPolyfill,
}
}
}