// Numbas version: exam_results_page_options {"name": "Demo: Geogebra - set bounds", "extensions": ["geogebra"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Demo: Geogebra - set bounds", "tags": [], "metadata": {"description": "

This demonstrates how to set xmin, ymin, xmax and ymax for an embedded geogebra diagram.

", "licence": "Creative Commons Attribution-NonCommercial 4.0 International"}, "statement": "

{setBounds(applet, -3, -0.5, 3,2.5) }

", "advice": "", "rulesets": {}, "extensions": ["geogebra"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"applet": {"name": "applet", "group": "Ungrouped variables", "definition": "geogebra_applet(600,450,[s: [ definition:\"Function(x^2 ,-sqrt(2), sqrt(2))\"]])", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["applet"], "variable_groups": [], "functions": {"setBounds": {"parameters": [["app", "ggbapplet"], ["xmin", "number"], ["ymin", "number"], ["xmax", "number"], ["ymax", "number"]], "type": "ggbapplet", "language": "javascript", "definition": "// See https://wiki.geogebra.org/en/Scripting_Commands and\n// https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_API\napp.promise.then(function(d) {\n d.app.evalCommand(\"ZoomIn(\" + xmin + \",\" + ymin + \",\" + xmax + \",\" + ymax + \")\");\n d.app.enableShiftDragZoom(false);\n});\nreturn new Numbas.jme.types.ggbapplet(app);\n"}}, "preamble": {"js": "", "css": ""}, "parts": [], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}]}]}], "contributors": [{"name": "William Haynes", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2530/"}]}