External files - GeoGebra, javascript

21.05.2019

Geogebra files placed within content are loaded. Now, I need to work on the size of the content within the container.

To embed an external file, save the javascript in a file within the content folder and load it as follows

<div id="box" class="jxgbox" 
	style="width:300px; 
		height:250px; 
		margin-left: auto; 
		margin-right: auto; " 
	color="#F1F6FA;" >
</div>
<script type="text/javascript" 
	src="linktofile/file.js">
</script>

Testing Geogebra implementation with jsxgraph

<div id="box" 
	class="jxgbox" 
	style="width:300px; 
		height:100px; 
		margin-left: auto; 
		margin-right: auto; " 
	color="#F1F6FA;" >
</div>
<script type="text/javascript">
var b = JXG.JSXGraph.loadBoardFromFile('box5' ,
 '../../../../geogebra_file/file.ggb',
  'Geogebra', );
</script>

I have not yet found a way to scale down the GeoGebra file when it is loaded. My solution is to save the geogebra file at a smaller scale when editing it in Geogebra.


(c) 2019 mrwilliams[at]sebinberlin.de - impressum und datenschutz - Powered by MathJax & XMin & HUGO & jsxgraph & mypaint