musicblocks
musicblocks copied to clipboard
sticky boolean blocks
Nathan found that sometimes you cannot drag a boolean block. After experimenting, we found that you could drag the block from the top. I suspect that the "hit area" is not being calculated properly when a boolean block resizes.
Hey @walterbender, Can I work on this issue.
Can you please elaborate more on the issue
I cannot seem to reproduce this issue. But it presumably was related to a misconfigured or corrupted hit area for the drag event.
@walterbender After testing extensively, I've figured out how to easily reproduce this issue and have a decent hypothesis as to why:
As shown in the above image, when connecting a number block other than the simple digit to the top notch of a boolean block, the block resizes to visually accommodate. However, when resizing, the hit area for the drag event does not resize with it, regardless of the amount resized. As the picture shows, the cursor is on the block just under the size that the inital boolean would be, and the block cannot drag (the cursor also does not have a click icon, showing that it's not in the hit area to select the block).
Here is another example, neither block allows dragging at cursor level, both allow it just above that level
After the case above, I also managed to get that selection area to be even less by overwhelming the resizing process. If you move a resized block from the top notch to the bottom one, the outer block resizes (leaving the block floating for a moment), thinks about it, and then snaps the block into place. Doing this along with other resizing seems to allow for smaller hit areas to be created, although I have not entirely figured out why or how small we can go (initial thought based on the next picture is that the equal block got confused and the hit box is the size of a single line number block). dragging from the top of the block seems to reset the hit area to the regular initial size in these cases, though:
Let me know if this is sufficient information to move forward with fixing it!
Your diagnosis seems correct. Thx.