From: Ian Jackson Date: Sat, 3 Apr 2021 17:27:15 +0000 (+0100) Subject: Click on background clears yellow haloes X-Git-Tag: otter-0.5.0~231 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=760f0e11f6a6f67e1d2f840be0bc0678b15fc9ad;p=otter.git Click on background clears yellow haloes Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index c92f13cf..fd682836 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -735,6 +735,11 @@ function drag_mousedown(e : MouseEvent, shifted: boolean) { var piece = target.dataset.piece!; if (!piece) { if (!shifted) { + let mr; + while (mr = movements.pop()) { + mr.p.last_seen_moved = null; + redisplay_ancillaries(mr.piece, mr.p); + } ungrab_all(); } return;