-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing the cursor depending on location in the View #118
Comments
On mouse move, we can manually check to see if the mouse is over something clickable. If it is, alter the css of the view (the whole view) to change the cursor. If not, make sure mouse pointer is default shape. This gives us non-square clickable areas with no performance hit. |
How do you know when some shape within the canvas is clickable? |
This is a problem no matter which method we choose for changing the mouse cursor. We could just add an agent variable Alternatively, we could consider all turtles clickable. This is somewhat true, given inspection. |
Well, what was half-proposing with individual canvases was that the clickable canvas would have CSS for changing the cursor on hover. Then the only code run for figuring out whether or not something is clickable is handled when the item's canvas is created.
Right, but then we have to constantly examine what agent (if any) is under the mouse and check its
Eh, seems problematic to me. Turtles are traditionally inspected through right-clicking. Left-clicking is intuitively used for actions upon turtles in interactive-View models like Bug Hunters Competition. Also, patches are inspectable, so they, too, then, would intuitively be considered "clickable". And links. So, basically, the whole model is "clickable". |
It would be nice for certain models (e.g. Bug Hunters Competition) to be able to have a different cursor when the mouse is over something clickable. This isn't possible in JVM NetLogo, but maybe the freedom afforded by our new platform makes it easier...? I'm not sure.
I looked into the issue a bit, but the only half-good answer I came up with was to put clickable things into their own canvases. Arguments against that:
The text was updated successfully, but these errors were encountered: