Zoom To Fit scripting?

SparksMaths shared this question 1 month ago
Needs Answer

There is now a very useful right click command called "Zoom to fit" which appears to attempt to zoom the graphics view to display all objects. (I'm using Geogebra 5.0.564.0-d)

Can this be implemented from a scripting command?

(also, less importantly, how does the right click menu command know where to zoom to? It occasionally fails when a very large change is needed)

Comments (3)

photo
1

Maybe you're looking for something like the attachment.

(Use it as a black box, it's pretty complex)

photo
1

Thanks - you're right - it's detailed work - good job.

However, if there's a simple menu command that does a halfway decent job (and crucially still leaves the user free to use mouse wheel to zoom, and drag etc) then surely it could be scriptable with a command?

photo
1

Quote: "However.........it could be scriptable with a command?"

I think: not in GGB-Script and not in JavaScript.

photo
© 2019 International GeoGebra Institute