Sorry if you found an grammatically mistake in my note. English isn’t my tongue language.
I’m learning GSAP and now I’m in Draggable plugin. as you know if you use onClick, by Default it will pass a pointerEvent
to your function:
gsap.registerPlugin(Draggable);
Draggable.create('.some-class', {
onClick: (pointerEvent)=>{
console.log(pointerEvent)
}
});
But when I use onClickParams, I’ll see the pointerEvent
has gone! my question is how to have onClickParams and pointerEvent at the same time:
gsap.registerPlugin(Draggable);
Draggable.create('.some-class', {
onClick: (param1, pointerEvent)=>{
console.log(param1); // 'param1'
console.log(pointerEvent); // undefined
},
onClickParams: ['param1']
});
Thanks For Your help!