Hide all points with a JavaScipt?

AsgerGN shared this question 4 years ago
Answered

Hey!

Yesterday I found another topic, of how to delete all points with a click of a button. This is how the script looked:

for (ind =

ggbApplet.getObjectNumber()-1; ind>=0;

ind=ind-1){nam= ggbApplet.getObjectName(ind)

typ= ggbApplet.getObjectType(nam)

/*alert(""+ind+" "+nam+" "+typ)*/

if (typ == "point") {

ggbApplet.deleteObject(nam)

}

}

---------------------------------------------------------

But this script deletes all points which means that all lines asosiated with the points, will get deleted.


But I need to know if I can change the script, to make it hide the points instead of deleting it.


I hope that you can help me.

Best regards

Asger

© 2022 International GeoGebra Institute