Repository navigation
feat: Shift+click selects several nodes, and the tools act on all of them - #333
Merged
Merged
Conversation
…them
With the Select tool, Shift+click adds or removes a node. Then:
- dragging any of them moves the group. Every member lands the same
number of tiles from where it started; if one would land on an
occupied tile the whole group goes back, because a group that lands
apart is not the shape the player was moving;
- Link and Unlink carry the selection over and apply to the node
clicked next: every member that may link does, and Unlink removes
the links between the selection and that node in either direction;
- Delete (Backspace on a Mac keyboard) removes them, refunding as the
Demolish tool does.
A click inside the group that moves nothing narrows it to that node. A
single selected node does not carry into Link, because every drag leaves
one selected and the next click would be a wire nobody asked for.
The selection is now STATE.selection, a set of node ids, and
selectedNodeId goes back to being only the Link source.
The help screen's Select entry claimed that clicking Compute or a DB
upgrades it, which the placement tools do. It now describes what the tool
does, in all eleven locales. The README's controls list has this and the
Shift hold from the previous change.
Touch has no Shift, so phones keep single selection.
Closes #89 item 2.
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #89, item 2: "Ability to select the multiple nodes and do operations like link/unlike, move node so on."
What a player can do
With the Select tool, Shift+click adds or removes a node. Then:
All selected nodes get the bright ring, and their links take the colours from #331.
Decisions to check
Code
The selection is now
STATE.selection, a set of node ids, andselectedNodeIdgoes back to being only the Link source.moveNodeTo()replaces two copies of the same mesh-and-ring code.Docs
The help screen's Select entry claimed that clicking Compute or a DB upgrades it, which the placement tools do. It now describes what the tool does, in all eleven locales. These lines haven't had a native speaker's review. The README's controls list now has this and the Shift hold from #332.
Checked
In a real browser with real mouse clicks and a held Shift key, on an LB, three Computes and a DB:
CVU, click the DBI ran 26 mutations across the drag, the tool carry-over, Link, Unlink, Delete and the resets. 25 were caught on the first run. The survivor, a Link source losing its bright ring, showed a missing test, which is now in.