Open HollowMan6 opened 4 months ago
After the discussion with the Blockly team, one possible way is to temporarily turn the SVG group into a canvas when the coordinates fall into the bounding box of those blockSVGs. Then we can convert coordinates and check the color of those coordinates to see if we are touching the transparent part.
Check for duplicates
Description
Currently, we rely on DragSelect to know which block gets selected. DragSelect seems to listen to the "blocks". However, it actually works by listening to the SVG path element, which is always a rectangle with some transparent parts forming a block. For irregularly shaped blocks, if you click on the transparent area that within the SVG rectangle, it will still get selected. (a mitigation has already been introduced in v0.1.4.)
Reproduction steps
See https://github.com/mit-cml/workspace-multiselect/pull/6#issuecomment-1315829670
Stack trace
No response
Screenshots
No response
Browsers
No response