chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fee3d7
)
clear halo when we touch a thing
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 21:14:09 +0000
(22:14 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 21:14:09 +0000
(22:14 +0100)
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 94e2d06ba45d2f0a92af736ae4e30099246497d6..4f6eb7579489cd440f35095612cd820c51b8c782 100644
(file)
--- 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);