ziko
Version:
a versatile javaScript framework offering a rich set of UI components, advanced mathematical utilities, reactivity, animations, client side routing and graphics capabilities
47 lines (45 loc) • 1.15 kB
JavaScript
import { ZikoEvent , EVENT_CONTROLLER } from "./ZikoEvent.js";
function wheel_controller(e){
EVENT_CONTROLLER.call(this,e,"wheel",null,null)
}
class ZikoEventWheel extends ZikoEvent{
constructor(target){
super(target);
this.event=null;
this.cache={
prefixe:"",
preventDefault:{
wheel:false,
},
paused:{
wheel:false,
},
stream:{
enabled:{
wheel:false,
},
clear:{
wheel:false,
},
history:{
wheel:[],
}
},
callbacks:{
click:[],
}
}
this.__controller={
wheel:wheel_controller.bind(this),
}
}
onWheel(...callbacks){
this.__onEvent("wheel",{},...callbacks)
return this;
}
}
const useWheelEvent=target=>new ZikoEventWheel(target);
export{
useWheelEvent,
ZikoEventWheel
}