evalCommand("a= Slider(0, 1)") not working in offline embedded applet
Answered
Hi,
thanks for all the great work you do!
When I open the attached file in chrome, the circle is added to the applet but the slider is not.
(screenshot01.png)
However executing:
ggbApplet.evalCommand("a=Slider(0,2)");
in the browser console directly, will add the slider.
(screenshot02.png)
Changing
ggbApplet.evalCommand("a=Slider(0,2)");
to:
ggbApplet.evalCommand("a=1");
in index.html will only produce a default slider.
What'S the correct way to add a custome slider to an embedded applet?
You have to use the correct GGb-command-syntax for slider:
---
Try ggbApplet.evalCommand('a=Slider(0,5,0.1,1,250,false,true,false,false)') retVal=
Use the JS command asyncEvalCommand(). Not sure though if it is the right way to script the applet at startup and not load it with ggbBase64 or material_id (Reference:GeoGebra Apps Embedding).
The bug with evalCommand() is fixed, please try now
Please don't use asyncEvalCommand(), that's experimental and will probably be removed soon
Comments have been locked on this page!