Skip to content

Canvas Prop for shouldCancelWhenOutside #64

@simonrahm

Description

@simonrahm

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions