Replies: 1 comment
-
was able to get it using van custom events, very cool! div({
id: 'ColorMinimal',
class: 'headerButton',
style: () => `background-color:${cssCol.val};min-width:6rem;height:100%;border-radius:10rem;`,
onclk: () => toggleUIPanel('MainControls'),
onpointerdown: (e) => { setInputMode('valueHue') },
}),
document.addEventListener('pointerup', function (event) {
if (getClickState(event)) {
const target = event.target
prnt('doc click')
target.dispatchEvent(new Event('clk'))
} else {
prnt('doc pointer up')
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, Im trying to replace default click detection with my own custom click detection. This prints doc click undefined
Is there a way to get the clickAction function defined in the div?
Beta Was this translation helpful? Give feedback.
All reactions