Debian Codegraph @

examples/polygon2.html

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <html>
2 <head>
3 <title>JSXGraph example</title>
4 <link rel="stylesheet" type="text/css" href="../distrib/jsxgraph.css" />
5 <script type="text/javascript" src="jquery-3.5.1.min.js"></script>
6 <!--<script type="text/javascript" src="prototype.js"></script>-->
7 <script type="text/javascript" src="../distrib/jsxgraphcore.js"></script>
8 </head>
9 <body>
10 <h1 onclick="brd.clearTraces();">Polygon</h1>
11 <form><input type="text"></form>
12 <!-- Drawing area -->
13 <div id="box" class="jxgbox" style="width:600px; height:600px; overflow:hidden; /*position:absolute; top:0px; left:0px;*/"></div>
14 <!-- Drawing area -->
15 <div id="debug" style="display:block;"></div>
16
17 <script type="text/javascript">
18 /* <![CDATA[ */
19 var brd = JXG.JSXGraph.initBoard('box', {originX: 300, originY: 300, grid:true, unitX: 15, unitY: 15, axis:true});
20 var A = brd.create('point', [-3,5], {name:'A', withLabel:true, visible:true});
21 var B = brd.create('point', [8,8], {name:'B', withLabel:true, visible:true});
22 var C = brd.create('point', [-4,-3], {name:'C', withLabel:true, visible:true});
23
24 var p2 = brd.create('polygon', [A,B,C],
25 {borders:{
26 visible:true,
27 withLabel:true,
28 label:{position:'top'}},
29 vertices:{visible:false, size:2},
30 withLabel:false,
31 hasInnerPoints:true,
32 fillColor:'yellow',
33 highlightFillColor:'blue',
34 scalable: false
35 });
36
37 /* ]]> */
38 </script>
39 </body>
40 </html>