hitable
元素与光标碰撞的相关属性。
关键属性
hittable: boolean
是否响应碰撞事件(交互事件),默认为 true。
hitType: IHitType
碰撞类型,默认为 visible。
ts
type IHitType =
| 'visible' // 碰撞可见的fill、stroke
| 'fill-visible' // 只碰撞可见的fill
| 'stroke-visible' // 只碰撞可见的stroke
| 'all' // 碰撞fill、stroke, 即使不可见
| 'fill' // 只碰撞fill, 即使不可见
| 'stroke' // 只碰撞stroke, 即使不可见
hitChildren: boolean
子元素是否响应碰撞事件(交互事件),默认为 true。