Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
var piece = target.dataset.piece!;
if (!piece) { return; }
let p = pieces[piece]!;
- if (p.pinned && !wresting && p.held!=us) return;
- drag_cancel();
-
let held = p.held;
+ drag_cancel();
+
drag_pieces = [];
if (held == us) {
dragging = DRAGGING.MAYBE_UNGRAB;
if (tp.held != us) continue;
drag_add_piece(tpiece,tp);
}
- } else if (held == null || wresting) {
+ } else if (held == null) {
+ if (p.pinned && !wresting) {
+ add_log_message('That piece is pinned to the table.');
+ return;
+ }
if (!shifted) {
ungrab_all();
}