From: Ian Jackson Date: Sun, 12 Jul 2020 21:14:09 +0000 (+0100) Subject: clear halo when we touch a thing X-Git-Tag: otter-0.2.0~1335 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=21e25ab98587b865c68da2647f6afdb3443c5f75;p=otter.git clear halo when we touch a thing --- diff --git a/templates/script.ts b/templates/script.ts index 94e2d06b..4f6eb757 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -149,6 +149,7 @@ function api_piece(f: (meth: string, payload: Object) => void, meth: string, piece: PieceId, p: PieceInfo, op: Object) { + clear_halo(piece,p); cseq += 1; p.cseq = cseq; f(meth, { @@ -247,6 +248,11 @@ function set_ungrab(piece: PieceId, p: PieceInfo) { redisplay_ancillaries(piece,p); } +function clear_halo(piece: PieceId, p: PieceInfo) { + p.last_seen_moved = null; + redisplay_ancillaries(piece,p); +} + function ancillary_node(piece: PieceId, stroke: string): SVGGraphicsElement { var nelem = document.createElementNS(svg_ns,'use'); nelem.setAttributeNS(null,'href','#surround'+piece);