From e1a6593c5d9209108ca9e78a1a092447c1865d8a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 25 Mar 2021 16:38:21 +0000 Subject: [PATCH] script: Do not constantly redisplay_ancillaries when moving (!) Signed-off-by: Ian Jackson --- templates/script.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/script.ts b/templates/script.ts index 2360b2f9..f745b091 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -772,8 +772,9 @@ function set_ungrab(piece: PieceId, p: PieceInfo) { } function clear_halo(piece: PieceId, p: PieceInfo) { + let was = p.last_seen_moved; p.last_seen_moved = null; - redisplay_ancillaries(piece,p); + if (was) redisplay_ancillaries(piece,p); } function ancillary_node(piece: PieceId, stroke: string): SVGGraphicsElement { -- 2.30.2