Skip to content

Commit d5a2881

Browse files
committed
(PR) feat: Double tap and drag to erase
saber-notes#1118 Signed-off-by: AnErrupTion <anerruption@disroot.org>
1 parent 49489d9 commit d5a2881

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/components/canvas/canvas_gesture_detector.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ class CanvasGestureDetectorState extends State<CanvasGestureDetector> {
479479
onPointerUp: _listenerPointerUpEvent,
480480
onPointerHover: _listenerPointerHoverEvent,
481481
child: GestureDetector(
482+
// Double tap and drag to switch to eraser
483+
onDoubleTapDown: (details) => widget.onStylusButtonChanged(true),
482484
child: LayoutBuilder(
483485
builder: (BuildContext context, BoxConstraints containerBounds) {
484486
this.containerBounds = containerBounds;

0 commit comments

Comments
 (0)