From: Ian Jackson Date: Tue, 13 Apr 2021 23:21:46 +0000 (+0100) Subject: js: Fix shift counted select to only add X-Git-Tag: otter-0.5.0~86 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b45ac4616dfd04bc20730a7baf4ebad7f6a29d6b;p=otter.git js: Fix shift counted select to only add Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 2c5bc9a9..685744a7 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -959,7 +959,7 @@ function mouse_find_lowest(e: MouseEvent) { function mouse_find_clicked(e: MouseEvent, target: SVGGraphicsElement, piece: PieceId, - allow_for_deselect: boolean, + count_allow_for_deselect: boolean, note_already: PieceSet | null, ): MouseFindClicked { @@ -970,7 +970,7 @@ function mouse_find_clicked(e: MouseEvent, } else { // special_count > 0 let clickpos = mouseevent_pos(e); return mouse_find_predicate( - special_count, allow_for_deselect, note_already, + special_count, count_allow_for_deselect, note_already, function(p) { return p_bbox_contains(p, clickpos); } ) } @@ -994,8 +994,7 @@ function drag_mousedown(e : MouseEvent, shifted: boolean) { let note_already = shifted ? null : Object.create(null); - let c = mouse_find_clicked(e, target, piece, - shifted, note_already); + let c = mouse_find_clicked(e, target, piece, false, note_already); if (c == null) return; let clicked = c.clicked; let held = c.held;