Closed jtpdowns closed 6 years ago
@j6k4m8 It seems like the p5.mouseButton keeps the last mouse press in a buffer somehow. Not sure how it works for us, but it looks like the first value for a right-click is 0
, then it switches to whatever the previous click was. Consider the example sequence below.
(trueClick, mouseButtonValue)
(right, 0)
(left, right)
(left, left)
(right, left)
this is weird. and DOES probably explain spiderwebbing. can't find p5 docs anywhere that explain this
I have no idea what's going on but I submitted a p5 bug report: https://github.com/processing/p5.js/issues/3087
Yeah, another user found a related error. The logic of the mousePressed button will run even if the user doesn't right-click, which means that placing a new node down in breadcrumbs may cause the activeNode to change to a closer node and extend from it instead. This should be impossible since all of that is conditioned on this.p.mouseButton === this.p.RIGHT
, but it still happens with a left-click.
Oof. Yeah this makes sense I guess, since it's always one click behind. I haven't heard anything from the p5 folks so we may need to fix this on our end
On Mon, Jul 30, 2018, 9:09 AM Joe Downs notifications@github.com wrote:
Yeah, another user found a related error. The logic of the mousePressed button will run even if the user doesn't right-click, which means that placing a new node down in breadcrumbs may cause the activeNode to change to a closer node and extend from it instead. This should be impossible since all of that is conditioned on this.p.mouseButton === this.p.RIGHT, but it still happens with a left-click.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aplbrain/colocar/issues/85#issuecomment-408857157, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqVBzu4xNzMSgp3i-YrMBvHZEfFaPIQks5uLwV0gaJpZM4VIKBw .
If one wants to select a previously placed node in breadcrumbs, right-clicking is the only option. However, right-clicking once will show a hint for node placement even if the cursor is over an existing node. A second click will select the node. This behavior is confusing, and so we should just select the node on the first click.