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:
9177d8b
)
js: Properly handle shift-click deselection
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 13 Apr 2021 22:41:22 +0000
(23:41 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 13 Apr 2021 22:41:22 +0000
(23: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 fd309091589c713686aa7f4699f94881eb625a10..60b07c41c850a30a6c16522e1c1b5c7458128810 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-987,6
+987,13
@@
function drag_mousedown(e : MouseEvent, shifted: boolean) {
drag_pieces = [];
if (held == us) {
+ if (shifted) {
+ for (let tpiece of clicked) {
+ let tp = pieces[tpiece]!;
+ do_ungrab(tpiece,tp);
+ }
+ return;
+ }
dragging = DRAGGING.MAYBE_UNGRAB;
// contrive to have these first
for (let piece of clicked) {