From bc58e5cb7905bac8f3962b0bb7f4571243509ff9 Mon Sep 17 00:00:00 2001 From: CharitSinghChauhan Date: Tue, 22 Apr 2025 11:32:49 +0530 Subject: [PATCH] Fix laser pointer trail disappearing on pointerup (#9413) Previously, the laser pointer trail would disappear as soon as the pointerup event was triggered. This fix delays the trail removal to ensure it persists for a smoother visual experience. Fixes #9413. --- packages/excalidraw/animated-trail.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/excalidraw/animated-trail.ts b/packages/excalidraw/animated-trail.ts index af6162e99..17cbf1096 100644 --- a/packages/excalidraw/animated-trail.ts +++ b/packages/excalidraw/animated-trail.ts @@ -129,7 +129,8 @@ export class AnimatedTrail implements Trail { } private update() { - this.pastTrails = []; + + this.start(); if (this.trailAnimation) { this.trailAnimation.setAttribute("begin", "indefinite");