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:
c6f9326
)
js: Do grab before drag
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 13 Apr 2021 22:42:24 +0000
(23:42 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 13 Apr 2021 22:42:24 +0000
(23:42 +0100)
This is more consistent and will enable better refactoring
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 60b07c41c850a30a6c16522e1c1b5c7458128810..6168baf237fa402fcebc6cbe2efbc7a8de19e888 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-1013,6
+1013,7
@@
function drag_mousedown(e : MouseEvent, shifted: boolean) {
add_log_message('That piece is pinned to the table.');
return;
}
+ grab_clicked(clicked);
dragging = DRAGGING.MAYBE_GRAB;
let for_drag = note_already
? Object.keys(note_already).concat(clicked)
@@
-1025,7
+1026,6
@@
function drag_mousedown(e : MouseEvent, shifted: boolean) {
+SPECIAL_MULTI_DELTA_MAX);
drag_add_piece(piece,p);
}
- grab_clicked(clicked);
} else {
add_log_message('That piece is held by another player.');
return;