Just a demo to test and play around "canvas" with the native interaction possibilities (some of them, there are so many of them) enabled from the options of Network modules of awesome vis.js library. To illustrate this discussion.
The following network has a fixed scale and position, such that the networks viewport exactly matches the pixels of the HTML canvas.
Example heavely adapted from this discussion on stackoverflow.

- 2 succesive clicks in canvas to draw an area including nodes or not.... 2nd click a bit longer
- one test is to drag the nodes from the border to the center to group them together, then draw an area around some of them or all.
Note that it is sometimes necessary to do this action twice before seeing a drawn area.
For example, if a first click has already been done to drag a node (e.g), this event remains active in the DOM until a 2nd click.

below initial nodes positions on starting


        

below nodes included in the drawed zone