Making a tool active with button or checkbox, inside embedded GeoGebra.

Nick Chura shared this question 5 years ago
Needs Answer

I'd like to allow users to make the Pen tool active with the click of a button or checkbox.


How do I do this? I could not find a command line option for setting particular tool as "active".


Note: I know that I could make only certain tools visible, but I'd like to be able to set a certain tool as active in the graphing window via a button or checkbox.


Thanks!

Comments (4)

photo
1

Thanks Noel.

Your OnClick code says:

ggbApplet.setMode(62)

Assuming Mode 62 is the Pen mode, is there a complete list of these mode numbers?


[Also, after using the pen mode, my cursor disappears until I move it out of the browser window -- not just the graph window, but actually outside of the browser. Is this a known bug?]

photo
1

Sorry, but I did not understand what exactly the remark on the disappearance of the cursor meant.

It is obvious that the pen only works in graphics, but you write "after using" so the cursor has become a + in graphics


Here is what I mean:


1. Opening up an embedded GeoGebra graph, I click to activate the Pen tool.

Here is my example: https://www.geogebra.org/ma...


2. When using the Pen tool, the "cursor" actually looks like a writing utensil.

3. I hold the mouse button, draw a polyline, and release the mouse button.

4. The polyline is displayed, but the cursor has disappeared. It is not in the shape of a pen or a "+". It is not visible at all.

5. If I move the mouse to position the now-invisible cursor, I see nothing, unless I move the mouse to a position completely outside of the browser window (on a Mac, this would be the "Dock" area, showing all of my regularly used applications).

6. This happens in Firefox, but not in Chrome. Is this just a Firefox issue, or something that can be addressed with Geogebra?

photo
1

One other detail -- If I use the pen tool, clicking and holding the mouse button until the cursor is just outside of the graph, then everything is fine and I can see the mouse cursor. However, if I use the pen tool and release the mouse button while the cursor is still inside of the graph, then the cursor immediately disappears, and I can't see it until I drag the cursor completely outside of the browser.


Could you try that? "Unclicking" to end your pen draw either inside the graphing window or outside?

photo
photo
1

Also, thank you for showing me the list of those code numbers!

© 2023 International GeoGebra Institute