Synchronous file load: Difference between revisions
From JSXGraph Wiki
No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<jsxgraph width="500" height="500" modules="GeogebraReader"> | <jsxgraph width="500" height="500" modules="GeogebraReader"> | ||
var board = JXG.JSXGraph.initBoard('jxgbox'); | var board = JXG.JSXGraph.initBoard('jxgbox'); | ||
JXG.FileReader.parseFileContent(' | JXG.FileReader.parseFileContent('//jsxgraph.org/geonext/point.ggb', board, 'GeoGebra', false); | ||
board.create('point',[0,0],{fixed:true, name:'jsxpoint1', size:1}); | board.create('point',[0,0],{fixed:true, name:'jsxpoint1', size:1}); | ||
Line 8: | Line 8: | ||
var G = JXG.getReference(board, "geogebrapoint1"); | var G = JXG.getReference(board, "geogebrapoint1"); | ||
J. | J.setAttribute({size: 5}); | ||
G. | G.setAttribute({size: 10}); | ||
board.setBoundingBox([-5, 5, 5, -5], true); | //board.setBoundingBox([-5, 5, 5, -5], true); | ||
</jsxgraph> | </jsxgraph> | ||
<source lang="javascript"> | <source lang="javascript"> | ||
var board = JXG.JSXGraph.initBoard('jxgbox'); | var board = JXG.JSXGraph.initBoard('jxgbox'); | ||
JXG.FileReader.parseFileContent(' | JXG.FileReader.parseFileContent('//jsxgraph.org/geonext/point.ggb', board, 'GeoGebra', false); | ||
board.create('point',[0,0],{fixed:true, name:'jsxpoint1', size:1}); | board.create('point',[0,0], {fixed:true, name:'jsxpoint1', size:1}); | ||
var J = JXG.getReference(board, "jsxpoint1"); | var J = JXG.getReference(board, "jsxpoint1"); | ||
var G = JXG.getReference(board, "geogebrapoint1"); | var G = JXG.getReference(board, "geogebrapoint1"); | ||
J. | J.setAttribute({size: 5}); | ||
G. | G.setAttribute({size: 10}); | ||
board.setBoundingBox([-5, 5, 5, -5], true); | board.setBoundingBox([-5, 5, 5, -5], true); | ||
</source> | </source> | ||
[[Category: | [[Category:Old]] |
Latest revision as of 12:59, 18 October 2024
var board = JXG.JSXGraph.initBoard('jxgbox');
JXG.FileReader.parseFileContent('//jsxgraph.org/geonext/point.ggb', board, 'GeoGebra', false);
board.create('point',[0,0], {fixed:true, name:'jsxpoint1', size:1});
var J = JXG.getReference(board, "jsxpoint1");
var G = JXG.getReference(board, "geogebrapoint1");
J.setAttribute({size: 5});
G.setAttribute({size: 10});
board.setBoundingBox([-5, 5, 5, -5], true);