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:
0a8c6b5
)
js: Multi select, actually select as many as we want!
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 3 Apr 2021 23:46:17 +0000
(
00:46
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 4 Apr 2021 19:07:53 +0000
(20:07 +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 672e5fbf026b063941daedeb29a567b02cf95466..cc8b3e438d3c4b8f9d874a307aafd9f28c9ed66a 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-851,7
+851,8
@@
function drag_mousedown(e : MouseEvent, shifted: boolean) {
let clickpos = mouseevent_pos(e);
clicked = [];
let uelem = defs_marker;
- for (let i=0; i<special_count; i++) {
+ while (clicked.length < special_count) {
+ let i = clicked.length;
uelem = uelem.previousElementSibling as any;
if (uelem == pieces_marker) {
add_log_message(`Not enough pieces! Stopped after ${i}.`);