chiark / gitweb /
script: Do not constantly redisplay_ancillaries when moving (!)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Mar 2021 16:38:21 +0000 (16:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Mar 2021 16:38:21 +0000 (16:38 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index 2360b2f955c3f9d45a75b684dbe83427cc28869f..f745b0913c63ffb12f6e629f59236bd13916fbe2 100644 (file)
@@ -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 {