File: multipleBoards.html

package info (click to toggle)
jsxgraph 1.3.5+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 26,044 kB
  • sloc: xml: 5,869; java: 1,072; python: 747; php: 192; makefile: 146; sh: 47
file content (28 lines) | stat: -rw-r--r-- 1,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
   <title>JSXGraph example</title>
   <link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
   <script type="text/javascript" src="/javascript/prototype/prototype.js"></script>
   <script type="text/javascript" src="../src/loadjsxgraph.js"></script>
</head>
<body>
<h2>Multiple boards</h2>
<div id="jxgbox1" class="jxgbox" style="width:600px; height:400px;"></div>
<div id="jxgbox2" class="jxgbox" style="width:600px; height:400px;"></div>
<div id="debug" style="display:block;"></div>
   <script type="text/javascript">
    /* <![CDATA[ */

        b1 = JXG.JSXGraph.initBoard('jxgbox1', {originX: 250, originY: 250, unitX: 50, unitY: 25});
        s = b1.createElement('slider', [[0,0],[5,0],[-5,0,5]]);
            
        b2 = JXG.JSXGraph.initBoard('jxgbox2', {originX: 250, originY: 250, unitX: 50, unitY: 25});
        a = b2.createElement('point', [function(){return s.Value();},function(){return s.Value();}]);
  /* ]]> */
  </script>
  <form>
    <input type="button" value="add board2 to board1" onClick="b1.addChild(b2)">
    <input type="button" value="remove board2 from b1" onClick="b1.removeChild(b2)">
  </form>
</body>
</html>