From: Ian Jackson Date: Thu, 25 Mar 2021 16:38:21 +0000 (+0000) Subject: script: Do not constantly redisplay_ancillaries when moving (!) X-Git-Tag: otter-0.5.0~415 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e1a6593c5d9209108ca9e78a1a092447c1865d8a;p=otter.git script: Do not constantly redisplay_ancillaries when moving (!) Signed-off-by: Ian Jackson --- 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 {