Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas Prop for shouldCancelWhenOutside #64

Open
simonrahm opened this issue Jun 19, 2022 · 1 comment
Open

Canvas Prop for shouldCancelWhenOutside #64

simonrahm opened this issue Jun 19, 2022 · 1 comment
Labels

Comments

@simonrahm
Copy link

Is your feature request related to a problem?

First of all, thanks for making this nice library!

I noticed that when your finger moves outside the canvas while drawing, the drawing stops. For some use cases that is quite annoying, especially when the user wants to draw near the edges.

Desired solution (feature)

The Canvas component should have a prop to tell whether the touch should be persisted when moving outside the Canvas or not. Something like:

<Canvas
   color={"#000"}
   thickness={20}
   opacity={1}
   shouldCancelWhenOutside={false}
/>

In Canvas.tsx i noticed a property ".shouldCancelWhenOutside(true)" which is hardcoded to true. Changing this to false seems to solve the problem. Would be nice to have this property controllable via the Canvas prop.

Alternatives considered

No response

Anything else?

No response

@simonrahm simonrahm added the enhancement New feature or request label Jun 19, 2022
@BenJeau
Copy link
Owner

BenJeau commented Jul 26, 2022

This should be an easy fix, like you mentioned. Unfortunately I do not have much time to work on this library, but if you can create a PR with the change, I'll happily merge it into the codebase. (or I'll maybe get the time in a couple of months)

Kwonkunkun added a commit to Kwonkunkun/react-native-draw that referenced this issue Apr 26, 2023
Motivation:

- shouldCancelWhenOutside option which is hardcoded to true
- I want have choice, set shouldCancelWhenOutside parameter

Modifications:

- add shouldCancelWhenOutside parameter in Canvas.tsx

Result: user can set shouldCancelWhenOutside parameter BenJeau#64
Kwonkunkun added a commit to Kwonkunkun/react-native-draw that referenced this issue May 5, 2023
Motivation:

- shouldCancelWhenOutside option which is hardcoded to true
- I want have choice, set shouldCancelWhenOutside parameter

Modifications:

- add shouldCancelWhenOutside parameter in Canvas.tsx

Result: user can set shouldCancelWhenOutside parameter BenJeau#64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants