Skip to content

how to block drawing? #110

Closed Answered by dninomiya
doxomo asked this question in Q&A
Oct 20, 2022 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

I solved with CSS pointer-event.

<button onClick={() => setReadOnly(true)}>read only</button>
<div className={!readOnly && 'pointer-events-none'}>
  <ReactSketchCanvas />
</div>

(with Tailwind CSS)

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vinothpandian
Comment options

Answer selected by vinothpandian
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #89 on January 16, 2023 07:34.