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:
01a2e0c
)
can pin and it works!
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 3 Oct 2020 00:41:29 +0000
(
01:41
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 3 Oct 2020 00:41:29 +0000
(
01:41
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index d40ac99ebce9ca5957b86b4dcfc8939aab542675..e1986b154d31c47e589def132ff14ac8e57c1554 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-420,9
+420,10
@@
function drag_mousedown(e : MouseEvent, shifted: boolean) {
var target = e.target as SVGGraphicsElement; // we check this just now!
var piece = target.dataset.piece!;
if (!piece) { return; }
+ let p = pieces[piece]!;
+ if (p.pinned && !wresting) return;
drag_cancel();
- let p = pieces[piece]!;
let held = p.held;
drag_pieces = [];