How to trigger draw event remotely? #628
moyjohnsen
started this conversation in
General
Replies: 1 comment
-
You can try triggering the event on the other div somediv.addEventListener('touchstart', (event) => {
someotherdiv.dispatchEvent(new TouchEvent('touchstart', event));
}); |
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
-
I would like to know if it is possible to trigger the draw event from outside of the canvas. Something like so:
somediv.addEventListener('touchstart', function(){ startdrawing(someotherdiv); })
I am doing this because I have a dynamically created div, and the
new signaturePad
call assigned to that div works on desktop browsers, but not on mobile. So I would like to call the draw function manually on a touch event.Beta Was this translation helpful? Give feedback.
All reactions