Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
var target = e.target as SVGGraphicsElement; // we check this just now!
var piece = target.dataset.piece!;
if (!piece) {
- ungrab_all();
+ if (!shifted) {
+ ungrab_all();
+ }
return;
}
let p = pieces[piece]!;
drag_add_piece(tpiece,tp);
}
} else if (held == null || wresting) {
+ if (!shifted) {
+ ungrab_all();
+ }
if (p.pinned && !wresting) {
add_log_message('That piece is pinned to the table.');
- ungrab_all();
return;
}
- if (!shifted) {
- ungrab_all();
- }
dragging = DRAGGING.MAYBE_GRAB;
drag_add_piece(piece,p);
set_grab(piece,p, us);