fix: hide xy-plane indicator

This commit is contained in:
Glen Whitney 2023-10-07 12:07:22 -07:00
parent 3245db6d07
commit 51a046590d

View File

@ -50,6 +50,11 @@ function postApplets(jApplets: AppletDescription[], codebase = '')
if config3d if config3d
worked := api.enable3D true worked := api.enable3D true
api.setPerspective 'T' api.setPerspective 'T'
// Get rid of the xy-plane indicator
xml .= api.getXML()
xml = xml.replace /plate.show="\w+"/, 'plate show="false"'
console.log 'Trying', xml
api.setXML xml
else else
api.setPerspective 'G' api.setPerspective 'G'
for name, value in jApp.params for name, value in jApp.params
@ -64,6 +69,7 @@ function postApplets(jApplets: AppletDescription[], codebase = '')
-depth - 10, depth + 10, -depth - 10, depth + 10,
false false
api.setAxesVisible 3, false, false, false api.setAxesVisible 3, false, false, false
api.setGridVisible 3, false
else else
api.setCoordSystem -10, 10 + jApp.width, -10, 10 + jApp.height api.setCoordSystem -10, 10 + jApp.width, -10, 10 + jApp.height
api.setAxesVisible false, false api.setAxesVisible false, false
@ -612,9 +618,9 @@ classHandler: Record<JoyceClass, ClassHandler> :=
// https://www.reddit.com/r/geogebra/comments/12cbr85/setlineopacity_command/ // https://www.reddit.com/r/geogebra/comments/12cbr85/setlineopacity_command/
// I don't really understand how/why it works, but it seems to // I don't really understand how/why it works, but it seems to
// So that's good enough for me // So that's good enough for me
xml := api.getXML name xml .= api.getXML name
xml.replace(/opacity="\d+"/, 'opacity="0"') xml = xml.replace /opacity="\d+"/, 'opacity="0"'
api.evalXML(xml) api.evalXML xml
// This last step is especially confusing... I think // This last step is especially confusing... I think
// evaluating the modified XML created a sort of second // evaluating the modified XML created a sort of second
// copy of the entity, and so we have to hide the original one // copy of the entity, and so we have to hide the original one