1 /*
  2     Copyright 2008-2021
  3         Matthias Ehmann,
  4         Michael Gerhaeuser,
  5         Carsten Miller,
  6         Bianca Valentin,
  7         Alfred Wassermann,
  8         Peter Wilfahrt
  9 
 10     This file is part of JSXGraph.
 11 
 12     JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
 13 
 14     You can redistribute it and/or modify it under the terms of the
 15 
 16       * GNU Lesser General Public License as published by
 17         the Free Software Foundation, either version 3 of the License, or
 18         (at your option) any later version
 19       OR
 20       * MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
 21 
 22     JSXGraph is distributed in the hope that it will be useful,
 23     but WITHOUT ANY WARRANTY; without even the implied warranty of
 24     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 25     GNU Lesser General Public License for more details.
 26 
 27     You should have received a copy of the GNU Lesser General Public License and
 28     the MIT License along with JSXGraph. If not, see <http://www.gnu.org/licenses/>
 29     and <http://opensource.org/licenses/MIT/>.
 30  */
 31 
 32 
 33 /*global JXG:true, define: true*/
 34 /*jslint nomen: true, plusplus: true*/
 35 
 36 /* depends:
 37  jxg
 38  base/constants
 39  math/math
 40  utils/color
 41  utils/type
 42  */
 43 
 44 define([
 45     'jxg', 'base/constants', 'math/math', 'utils/color', 'utils/type'
 46 ], function (JXG, Const, Mat, Color, Type) {
 47 
 48     "use strict";
 49 
 50     /**
 51      * Options Namespace
 52      * @description These are the default options of the board and of all geometry elements.
 53      * @namespace
 54      * @name JXG.Options
 55      */
 56     JXG.Options = {
 57         jc: {
 58             enabled: true,
 59             compile: true
 60         },
 61 
 62         /*
 63          * Options that are used directly within the board class
 64          */
 65         board: {
 66             /**#@+
 67              * @visprop
 68              */
 69 
 70             //updateType: 'hierarchical', // 'all'
 71 
 72             /**
 73              * Bounding box of the visible area in user coordinates.
 74              * It is an array consisting of four values:
 75              * [x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]
 76              *
 77              * The canvas will be spanned from the upper left corner (<sub>1</sub>, y<sub>1</sub>)
 78              * to the lower right corner (x<sub>2</sub>, y<sub>2</sub>).
 79              *
 80              * @name JXG.Board#boundingbox
 81              * @type Array
 82              * @default [-5, 5, 5, -5]
 83              * @example
 84              * var board = JXG.JSXGraph.initBoard('jxgbox', {
 85              *         boundingbox: [-5, 5, 5, -5],
 86              *         axis: true
 87              *     });
 88              */
 89             boundingBox: [-5, 5, 5, -5],
 90 
 91             /**
 92              * Maximal bounding box of the visible area in user coordinates.
 93              * It is an array consisting of four values:
 94              * [x<sub>1</sub>, y<sub>1</sub>, x<sub>2</sub>, y<sub>2</sub>]
 95              *
 96              * The bounding box of the canvas must be inside of this maximal
 97              * boundings box.
 98              * @name JXG.Board#maxboundingbox
 99              * @type Array
100              * @see JXG.Board#boundingbox
101              * @default [-Infinity, Infinity, Infinity, -Infinity]
102              *
103              * @example
104              * var board = JXG.JSXGraph.initBoard('jxgbox', {
105              *         boundingbox: [-5, 5, 5, -5],
106              *         maxboundingbox: [-8, 8, 8, -8],
107              *         pan: {enabled: true},
108              *         axis: true
109              *     });
110              *
111              * </pre><div id="JXG065e2750-217c-48ed-a52b-7d7df6de7055" class="jxgbox" style="width: 300px; height: 300px;"></div>
112              * <script type="text/javascript">
113              *     (function() {
114              *         var board = JXG.JSXGraph.initBoard('JXG065e2750-217c-48ed-a52b-7d7df6de7055', {
115              *             showcopyright: false, shownavigation: false,
116              *             boundingbox: [-5,5,5,-5],
117              *             maxboundingbox: [-8,8,8,-8],
118              *             pan: {enabled: true},
119              *             axis:true
120              *         });
121              *
122              *     })();
123              *
124              * </script><pre>
125              *
126              */
127             maxBoundingBox: [-Infinity, Infinity, Infinity, -Infinity],
128 
129             /**
130              * Additional zoom factor multiplied to {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}.
131              *
132              * @name JXG.Board#zoomFactor
133              * @type Number
134              * @default 1.0
135              */
136             zoomFactor: 1,
137 
138             /**
139              * Zoom factor in horizontal direction.
140              *
141              * @name JXG.Board#zoomX
142              * @see JXG.Board#zoomY
143              * @type Number
144              * @default 1.0
145              */
146             zoomX: 1,
147 
148             /**
149              * Zoom factor in vertical direction.
150              *
151              * @name JXG.Board#zoomY
152              * @see JXG.Board#zoomX
153              * @type Number
154              * @default 1.0
155              */
156             zoomY: 1,
157 
158             /**
159              * Title string for the board.
160              * Primarily used in an invisible text element which is adressed by
161              * the attribute 'aria-labelledby' from the JSXGraph container.
162              * JSXGraph creates a new div-element with id "{containerid}_ARIAlabel"
163              * containing this string.
164              *
165              * @name JXG.Board#title
166              * @see JXG.Board#description
167              * @type String
168              * @default ''
169              *
170              */
171             title: '',
172 
173             /**
174              * Description string for the board.
175              * Primarily used in an invisible text element which is adressed by
176              * the attribute 'aria-describedby' from the JSXGraph container.
177              * JSXGraph creates a new div-element with id "{containerid}_ARIAdescription"
178              * containing this string.
179              *
180              * @name JXG.Board#description
181              * @see JXG.Board#title
182              * @type String
183              * @default ''
184              *
185              */
186             description: '',
187 
188             /**
189              * Show copyright string in canvas.
190              *
191              * @name JXG.Board#showCopyright
192              * @type Boolean
193              * @default true
194              */
195             showCopyright: true,
196 
197             /**
198              * Show default axis.
199              * If shown, the horizontal axis can be accessed via JXG.Board.defaultAxes.x, the
200              * vertical axis can be accessed via JXG.Board.defaultAxes.y.
201              * Both axes have a sub-element "defaultTicks".
202              *
203              * Value can be Boolean or an object containing axis attributes.
204              *
205              * @name JXG.Board#axis
206              * @type Boolean
207              * @default false
208              */
209             axis: false,
210 
211             /**
212              * Attributes for the default axes in case of the attribute
213              * axis:true in {@link JXG.JSXGraph#initBoard}.
214              *
215              * @name JXG.Board#defaultAxes
216              * @type {Object}
217              * @default {x: {name:'x'}, y: {name: 'y'}}
218              *
219              */
220             defaultAxes: {
221                 x: {
222                     name: 'x',
223                     ticks: {
224                         label: {
225                             visible: 'inherit',
226                             anchorX: 'middle',
227                             anchorY: 'top',
228                             fontSize: 12,
229                             offset: [0, -3]
230                         },
231                         drawZero: false,
232                         visible: 'inherit'
233                     }
234                 },
235                 y: {
236                     name: 'y',
237                     ticks: {
238                         label: {
239                             visible: 'inherit',
240                             anchorX: 'right',
241                             anchorY: 'middle',
242                             fontSize: 12,
243                             offset: [-6, 0]
244                         },
245                         tickEndings: [1, 0],
246                         drawZero: false,
247                         visible: 'inherit'
248                     }
249                 }
250             },
251 
252             /**
253              * Display of navigation arrows and zoom buttons in the navigation bar.
254              *
255              * @name JXG.Board#showNavigation
256              * @type Boolean
257              * @default true
258              */
259             showNavigation: true,
260 
261             /**
262              * Display of zoom buttons in the navigation bar. To show zoom buttons, additionally
263              * showNavigation has to be set to true.
264              *
265              * @name JXG.Board#showZoom
266              * @type Boolean
267              * @default true
268              */
269             showZoom: true,
270 
271             /**
272              * Show a button in the navigation bar to force reload of a construction.
273              * Works only with the JessieCode tag.
274              *
275              * @name JXG.Board#showReload
276              * @type Boolean
277              * @default false
278              */
279             showReload: false,
280 
281             /**
282              * Show a button in the navigation bar to enable screenshots.
283              *
284              * @name JXG.Board#showScreenshot
285              * @type Boolean
286              * @default false
287              */
288             showScreenshot: false,
289 
290             /**
291              * Attributes to control the screenshot function.
292              * The following attributes can be set:
293              * <ul>
294              *  <li>scale: scaling factor (default=1.0)
295              *  <li>type: format of the screenshot image. Default: png
296              *  <li>symbol: Unicode symbol which is shown in the navigation bar. Default: '\u2318'
297              *  <li>css: CSS rules to format the div element containing the screen shot image
298              *  <li>cssButton: CSS rules to format the close button of the div element containing the screen shot image
299              * </ul>
300              *
301              * @name JXG.Board#screenshot
302              * @type {Object}
303              */
304             screenshot: {
305                 scale: 1.0,
306                 type: 'png',
307                 symbol: '\u2318', //'\u22b9', //'\u26f6',
308                 css: 'background-color:#eeeeee; opacity:1.0; border:2px solid black; border-radius:10px; text-align:center',
309                 cssButton:  'padding: 4px 10px; border: solid #356AA0 1px; border-radius: 5px; position: absolute; right: 2ex; top: 2ex; background-color: rgba(255, 255, 255, 0.3);'
310             },
311 
312             /**
313              * Show a button in the navigation bar to start fullscreen mode.
314              *
315              * @name JXG.Board#showFullscreen
316              * @type Boolean
317              * @see JXG.Board#fullscreen
318              * @default false
319              */
320             showFullscreen: false,
321 
322             /**
323              * Attribute(s) to control the fullscreen icon. The attribute "showFullscreen"
324              * controls if the icon is shown.
325              * The following attribute(s) can be set:
326              * <ul>
327              *  <li>symbol: Unicode symbol which is shown in the navigation bar. Default: '\u25a1'
328              * </ul>
329              *
330              * @example
331              * var board = JXG.JSXGraph.initBoard('35bec5a2-fd4d-11e8-ab14-901b0e1b8723',
332              *             {boundingbox: [-8, 8, 8,-8], axis: true,
333              *             showcopyright: false,
334              *             showFullscreen: true,
335              *             fullscreen: {
336              *                  symbol: '\u22c7'
337              *              }
338              *             });
339              * var pol = board.create('polygon', [[0, 1], [3,4], [1,-4]], {fillColor: 'yellow'});
340              *
341              * </pre><div id="JXGa35bec5a2-fd4d-11e8-ab14-901b0e1b8723" class="jxgbox" style="width: 300px; height: 300px;"></div>
342              * <script type="text/javascript">
343              *     (function() {
344              *         var board = JXG.JSXGraph.initBoard('JXGa35bec5a2-fd4d-11e8-ab14-901b0e1b8723',
345              *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false,
346              *              showFullscreen: true,
347              *              fullscreen: {
348              *                  symbol: '\u22c7'
349              *                  }
350              *             });
351              *     var pol = board.create('polygon', [[0, 1], [3,4], [1,-4]], {fillColor: 'yellow'});
352              *     })();
353              *
354              * </script><pre>
355              *
356              * @name JXG.Board#fullscreen
357              * @see JXG.Board#showFullscreen
358              * @type {Object}
359              */
360             fullscreen: {
361                 symbol: '\u26f6' //'\u25a1'
362             },
363 
364             /**
365              * Show a button which allows to clear all traces of a board.
366              *
367              * @name JXG.Board#showClearTraces
368              * @type Boolean
369              * @default false
370              */
371             showClearTraces: false,
372 
373             /**
374              * If set to true the bounding box might be changed such that
375              * the ratio of width and height of the hosting HTML div is equal
376              * to the ratio of width and height of the bounding box.
377              *
378              * This is necessary if circles should look like circles and not
379              * like ellipses. It is recommended to set keepAspectRatio = true
380              * for geometric applets. For function plotting keepAspectRatio = false
381              * might be the better choice.
382              *
383              * @name JXG.Board#keepAspectRatio
384              * @see JXG.Board#boundingbox
385              * @see JXG.Board#setBoundingBox
386              * @type Boolean
387              * @default false
388              */
389             keepAspectRatio: false,
390 
391             /**
392              * If set true and
393              * hasPoint() is true for both an element and it's label,
394              * the element (and not the label) is taken as drag element.
395              *
396              * If set false and hasPoint() is true for both an element and it's label,
397              * the label is taken (if it is on a higher layer than the element)
398              *
399              * @name JXG.Board#ignoreLabels
400              * @type Booelan
401              * @default true
402              */
403             ignoreLabels: true,
404 
405             /**
406              * Maximum number of digits in automatic label generation.
407              * For example, if set to 1 automatic point labels end at "Z".
408              * If set to 2, point labels end at "ZZ".
409              *
410              * @name JXG.Board#maxNameLength
411              * @see JXG.Board#generateName
412              * @type Number
413              * @default 1
414              */
415             maxNameLength: 1,
416 
417             /**
418              * Supply the document object. Defaults to window.document
419              *
420              * @name JXG.Board#document
421              * @type DOM object
422              * @default false (meaning window.document)
423              */
424             document: false,
425 
426             /**
427              * If true the first element of the set JXG.board.objects having hasPoint==true is taken as drag element.
428              *
429              * @name JXG.Board#takeFirst
430              * @type Boolean
431              * @default false
432              */
433             takeFirst: false,
434 
435             /**
436             * If true, when read from a file or string - the size of the div can be changed by the construction text.
437             *
438             * @name JXG.Board#takeSizeFromFile
439             * @type Boolean
440             * @default false
441             */
442             takeSizeFromFile: false,
443 
444             /**
445              * Default rendering engine. Possible values are 'svg', 'canvas', 'vml', 'no', or 'auto'.
446              * If the rendering engine is not available JSXGraph tries to detect a different engine.
447              *
448              * <p>
449              * In case of 'canvas' it is advisable to call 'board.update()' after all elements have been
450              * constructed. This ensures that all elements are drawn with their intended visual appearance.
451              *
452              * @name JXG.Board#renderer
453              * @type String
454              * @default 'auto'
455              */
456             renderer: 'auto',
457 
458             /**
459              * Time (in msec) between two animation steps. Used in
460              * {@link JXG.CoordsElement#moveAlong}, {@link JXG.CoordsElement#moveTo} and
461              * {@link JXG.CoordsElement#visit}.
462              *
463              * @name JXG.Board#animationDelay
464              * @type Number
465              * @default 35
466              * @see JXG.CoordsElement#moveAlong
467              * @see JXG.CoordsElement#moveTo
468              * @see JXG.CoordsElement#visit
469              */
470             animationDelay: 35,
471 
472             /**
473              * Maximum frame rate of the board, i.e. maximum number of updates per second
474              * triggered by move events.
475              *
476              * @name JXG.Board#maxFrameRate
477              * @type Number
478              * @default 40
479              */
480             maxFrameRate: 40,
481 
482             /**
483              * Allow user interaction by registering mouse, pointer and touch events.
484              *
485              * @name JXG.Board#registerEvents
486              * @type Boolean
487              * @default true
488              */
489             registerEvents: true,
490 
491             /**
492              * Change redraw strategy in SVG rendering engine.
493              *
494              * If set to 'svg', before every redrawing of the JSXGraph construction
495              * the SVG sub-tree of the DOM tree is taken out of the DOM.
496              *
497              * If set to 'all', before every redrawing of the JSXGraph construction the
498              * complete DOM tree is taken out of the DOM.
499              * If set to 'none' the redrawing is done in-place.
500              *
501              * Using 'svg' or 'all' speeds up the update process considerably. The risk
502              * is that if there is an exception, only a white div or window is left.
503              *
504              * @name JXG.Board#minimizeReflow
505              * @type String
506              * @default 'svg'
507              */
508             minimizeReflow: 'svg',
509 
510             /**
511              * A number that will be added to the absolute position of the board used in mouse coordinate
512              * calculations in {@link JXG.Board#getCoordsTopLeftCorner}.
513              *
514              * @name JXG.Board#offsetX
515              * @see JXG.Board#offsetY
516              * @type Number
517              * @default 0
518              */
519             offsetX: 0,
520 
521             /**
522              * A number that will be added to the absolute position of the board used in mouse coordinate
523              * calculations in {@link JXG.Board#getCoordsTopLeftCorner}.
524              *
525              * @name JXG.Board#offsetY
526              * @see JXG.Board#offsetX
527              * @type Number
528              * @default 0
529              */
530             offsetY: 0,
531 
532             /**
533              * Control the possibilities for zoom interaction.
534              *
535              * Possible sub-attributes with default values are:
536              * <pre>
537              * zoom: {
538              *   factorX: 1.25,  // horizontal zoom factor (multiplied to {@link JXG.Board#zoomX})
539              *   factorY: 1.25,  // vertical zoom factor (multiplied to {@link JXG.Board#zoomY})
540              *   wheel: true,     // allow zooming by mouse wheel or
541              *   				   // by pinch-to-toom gesture on touch devices
542              *   needShift: true, // mouse wheel zooming needs pressing of the shift key
543              *   min: 0.001        // minimal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomOut
544              *   max: 1000.0       // maximal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomIn
545              *
546              *   pinchHorizontal: true // Allow pinch-to-zoom to zoom only horizontal axis
547              *   pinchVertical: true   // Allow pinch-to-zoom to zoom only vertical axis
548              *   pinchSensitivity: 7   // Sensitivity (in degrees) for recognizing horizontal or vertical pinch-to-zoom gestures.
549              * }
550              * </pre>
551              *
552              * Deprecated: zoom.eps which is superseded by zoom.min
553              *
554              * @name JXG.Board#zoom
555              * @type Object
556              * @default
557              */
558             zoom: {
559                 enabled: true,
560                 factorX: 1.25,
561                 factorY: 1.25,
562                 wheel: true,
563                 needShift: true,
564                 min: 0.0001,
565                 max: 10000.0,
566                 pinchHorizontal: true,
567                 pinchVertical: true,
568                 pinchSensitivity: 7
569             },
570 
571             /**
572              * Control the possibilities for panning interaction (i.e. moving the origin).
573              *
574              * Possible sub-attributes with default values are:
575              * <pre>
576              * pan: {
577              *   enabled: true   // Allow panning
578              *   needTwoFingers: false, // panning is done with two fingers on touch devices
579              *   needShift: true, // mouse panning needs pressing of the shift key
580              * }
581              * </pre>
582              *
583              * @name JXG.Board#pan
584              * @type Object
585              */
586             pan: {
587                 needShift: true,
588                 needTwoFingers: false,
589                 enabled: true
590             },
591 
592             /**
593              * Control the possibilities for dragging objects.
594              *
595              * Possible sub-attributes with default values are:
596              * <pre>
597              * drag: {
598              *   enabled: true   // Allow dragging
599              * }
600              * </pre>
601              *
602              * @name JXG.Board#drag
603              * @type Object
604              * @default {enabled: true}
605              */
606             drag: {
607                 enabled: true
608             },
609 
610             /**
611              * Control the possibilities for a selection rectangle.
612              * Starting a selection event triggers the "startselecting" event.
613              * When the mouse pointer is released, the "stopselecting" event is fired.
614              * The "stopselecting" event must be supplied by the user.
615              * <p>
616              * Possible sub-attributes with default values are:
617              * <pre>
618              * selection: {
619              *   enabled: false,
620              *   name: 'selectionPolygon',
621              *   needShift: false,  // mouse selection needs pressing of the shift key
622              *   needCtrl: true,    // mouse selection needs pressing of the shift key
623              *   withLines: false,  // Selection polygon has border lines
624              *   vertices: {
625              *       visible: false
626              *   },
627              *   fillColor: '#ffff00',
628              *   visible: false      // Initial visibility. Should be set to false always
629              * }
630              * </pre>
631              *
632              * @example
633              * board.on('stopselecting', function(){
634              *     var box = board.stopSelectionMode(),
635              *     // bbox has the coordinates of the selectionr rectangle.
636              *     // Attention: box[i].usrCoords have the form [1, x, y], i.e.
637              *     // are homogeneous coordinates.
638              *     bbox = box[0].usrCoords.slice(1).concat(box[1].usrCoords.slice(1));
639              *     // Set a new bounding box
640              *     board.setBoundingBox(bbox, false);
641              * });
642              *
643              * @name JXG.Board#selection
644              * @see JXG.Board#startselecting
645              * @see JXG.Board#stopselecting
646              * @see JXG.Board#mousestartselecting
647              * @see JXG.Board#pointerstartselecting
648              * @see JXG.Board#touchstartselecting
649              * @see JXG.Board#mousestopselecting
650              * @see JXG.Board#pointerstopselecting
651              * @see JXG.Board#touchstopselecting
652              * @type Object
653              * @default
654              */
655             selection: {
656                 enabled: false,
657                 name: 'selectionPolygon',
658                 needShift: false,
659                 needCtrl: true,
660                 withLines: false,
661                 vertices: {
662                     visible: false
663                 },
664                 fillColor: '#ffff00',
665                 visible: false
666             },
667 
668             /**
669              * If true, the infobox is shown on mouse/pen over for all points
670              * which have set their attribute showInfobox to 'inherit'.
671              * If a point has set its attribute showInfobox to false or true,
672              * that value will have priority over this value.
673              *
674              * @name JXG.Board#showInfobox
675              * @see Point#showInfobox
676              * @type Boolean
677              * @default true
678              */
679             showInfobox: true
680 
681             /**#@-*/
682         },
683 
684         /**
685          * Options that are used by the navigation bar.
686          *
687          * Default values are
688          * <pre>
689          * JXG.Option.navbar: {
690          *   strokeColor: '#333333',
691          *   fillColor: 'transparent',
692          *   highlightFillColor: '#aaaaaa',
693          *   padding: '2px',
694          *   position: 'absolute',
695          *   fontSize: '14px',
696          *   cursor: 'pointer',
697          *   zIndex: '100',
698          *   right: '5px',
699          *   bottom: '5px'
700          * },
701          * </pre>
702          * These settings are overruled by the CSS class 'JXG_navigation'.
703          * @deprecated
704          * @type {Object}
705          * @name JXG.Options#navbar
706          *
707          */
708         navbar: {
709             strokeColor: '#333333', //'#aaaaaa',
710             fillColor: 'transparent', //#f5f5f5',
711             highlightFillColor: '#aaaaaa',
712             padding: '2px',
713             position: 'absolute',
714             fontSize: '14px',
715             cursor: 'pointer',
716             zIndex: '100',
717             right: '5px',
718             bottom: '5px'
719             //border: 'none 1px black',
720             //borderRadius: '4px'
721         },
722 
723          /*
724           *  Generic options used by {@link JXG.GeometryElement}
725           */
726         elements: {
727             // the following tag is a meta tag: http://code.google.com/p/jsdoc-toolkit/wiki/MetaTags
728 
729             /**#@+
730              * @visprop
731              */
732 
733             /**
734              * The stroke color of the given geometry element.
735              * @type String
736              * @name JXG.GeometryElement#strokeColor
737              * @see JXG.GeometryElement#highlightStrokeColor
738              * @see JXG.GeometryElement#strokeWidth
739              * @see JXG.GeometryElement#strokeOpacity
740              * @see JXG.GeometryElement#highlightStrokeOpacity
741              * @default {@link JXG.Options.elements.color#strokeColor}
742              */
743             strokeColor: '#0000ff',
744 
745             /**
746              * The stroke color of the given geometry element when the user moves the mouse over it.
747              * @type String
748              * @name JXG.GeometryElement#highlightStrokeColor
749              * @see JXG.GeometryElement#strokeColor
750              * @see JXG.GeometryElement#strokeWidth
751              * @see JXG.GeometryElement#strokeOpacity
752              * @see JXG.GeometryElement#highlightStrokeOpacity
753              * @default {@link JXG.Options.elements.color#highlightStrokeColor}
754              */
755             highlightStrokeColor: '#C3D9FF',
756 
757             /**
758              * The fill color of this geometry element.
759              * @type String
760              * @name JXG.GeometryElement#fillColor
761              * @see JXG.GeometryElement#highlightFillColor
762              * @see JXG.GeometryElement#fillOpacity
763              * @see JXG.GeometryElement#highlightFillOpacity
764              * @default {@link JXG.Options.elements.color#fillColor}
765              */
766             fillColor: 'red',
767 
768             /**
769              * The fill color of the given geometry element when the mouse is pointed over it.
770              * @type String
771              * @name JXG.GeometryElement#highlightFillColor
772              * @see JXG.GeometryElement#fillColor
773              * @see JXG.GeometryElement#fillOpacity
774              * @see JXG.GeometryElement#highlightFillOpacity
775              * @default {@link JXG.Options.elements.color#highlightFillColor}
776              */
777             highlightFillColor: 'none',
778 
779             /**
780              * Opacity for element's stroke color.
781              * @type Number
782              * @name JXG.GeometryElement#strokeOpacity
783              * @see JXG.GeometryElement#strokeColor
784              * @see JXG.GeometryElement#highlightStrokeColor
785              * @see JXG.GeometryElement#strokeWidth
786              * @see JXG.GeometryElement#highlightStrokeOpacity
787              * @default {@link JXG.Options.elements#strokeOpacity}
788              */
789             strokeOpacity: 1,
790 
791             /**
792              * Opacity for stroke color when the object is highlighted.
793              * @type Number
794              * @name JXG.GeometryElement#highlightStrokeOpacity
795              * @see JXG.GeometryElement#strokeColor
796              * @see JXG.GeometryElement#highlightStrokeColor
797              * @see JXG.GeometryElement#strokeWidth
798              * @see JXG.GeometryElement#strokeOpacity
799              * @default {@link JXG.Options.elements#highlightStrokeOpacity}
800              */
801             highlightStrokeOpacity: 1,
802 
803             /**
804              * Opacity for fill color.
805              * @type Number
806              * @name JXG.GeometryElement#fillOpacity
807              * @see JXG.GeometryElement#fillColor
808              * @see JXG.GeometryElement#highlightFillColor
809              * @see JXG.GeometryElement#highlightFillOpacity
810              * @default {@link JXG.Options.elements.color#fillOpacity}
811              */
812             fillOpacity: 1,
813 
814             /**
815              * Opacity for fill color when the object is highlighted.
816              * @type Number
817              * @name JXG.GeometryElement#highlightFillOpacity
818              * @see JXG.GeometryElement#fillColor
819              * @see JXG.GeometryElement#highlightFillColor
820              * @see JXG.GeometryElement#fillOpacity
821              * @default {@link JXG.Options.elements.color#highlightFillOpacity}
822              */
823             highlightFillOpacity: 1,
824 
825             /**
826              * Gradient type. Possible values are 'linear'. 'radial' or null.
827              *
828              * @example
829              *     var a = board.create('slider', [[0, -0.2], [3.5, -0.2], [0, 0, 2 * Math.PI]], {name: 'angle'});
830              *     var b = board.create('slider', [[0, -0.4], [3.5, -0.4], [0, 0, 1]], {name: 'offset1'});
831              *     var c = board.create('slider', [[0, -0.6], [3.5, -0.6], [0, 1, 1]], {name: 'offset2'});
832              *
833              *     var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
834              *                 fillOpacity: 1,
835              *                 fillColor: 'yellow',
836              *                 gradient: 'linear',
837              *                 gradientSecondColor: 'blue',
838              *                 gradientAngle: function() { return a.Value(); },
839              *                 gradientStartOffset: function() { return b.Value(); },
840              *                 gradientEndOffset: function() { return c.Value(); },
841              *                 hasInnerPoints: true
842              *         });
843              *
844              * </pre><div id="JXG3d04b5fd-0cd4-4f49-8c05-4e9686cd7ff0" class="jxgbox" style="width: 300px; height: 300px;"></div>
845              * <script type="text/javascript">
846              *     (function() {
847              *         var board = JXG.JSXGraph.initBoard('JXG3d04b5fd-0cd4-4f49-8c05-4e9686cd7ff0',
848              *             {boundingbox: [-1.5, 4.5, 5, -1.5], axis: true, showcopyright: false, shownavigation: false});
849              *         var a = board.create('slider', [[0, -0.2], [3.5, -0.2], [0, 0, 2 * Math.PI]], {name: 'angle'});
850              *         var b = board.create('slider', [[0, -0.4], [3.5, -0.4], [0, 0, 1]], {name: 'offset1'});
851              *         var c = board.create('slider', [[0, -0.6], [3.5, -0.6], [0, 1, 1]], {name: 'offset2'});
852              *
853              *         var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
854              *                     fillOpacity: 1,
855              *                     fillColor: 'yellow',
856              *                     gradient: 'linear',
857              *                     gradientSecondColor: 'blue',
858              *                     gradientAngle: function() { return a.Value(); },
859              *                     gradientStartOffset: function() { return b.Value(); },
860              *                     gradientEndOffset: function() { return c.Value(); },
861              *                     hasInnerPoints: true
862              *             });
863              *
864              *     })();
865              *
866              * </script><pre>
867              *
868              * @example
869              *     var cx = board.create('slider', [[0, -.2], [3.5, -.2], [0, 0.5, 1]], {name: 'cx, cy'});
870              *     var fx = board.create('slider', [[0, -.4], [3.5, -.4], [0, 0.5, 1]], {name: 'fx, fy'});
871              *     var o1 = board.create('slider', [[0, -.6], [3.5, -.6], [0, 0.0, 1]], {name: 'offset1'});
872              *     var o2 = board.create('slider', [[0, -.8], [3.5, -.8], [0, 1, 1]], {name: 'offset2'});
873              *     var r = board.create('slider', [[0, -1], [3.5, -1], [0, 0.5, 1]], {name: 'r'});
874              *     var fr = board.create('slider', [[0, -1.2], [3.5, -1.2], [0, 0, 1]], {name: 'fr'});
875              *
876              *     var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
877              *                 fillOpacity: 1,
878              *                 fillColor: 'yellow',
879              *                 gradient: 'radial',
880              *                 gradientSecondColor: 'blue',
881              *                 gradientCX: function() { return cx.Value(); },
882              *                 gradientCY: function() { return cx.Value(); },
883              *                 gradientR: function() { return r.Value(); },
884              *                 gradientFX: function() { return fx.Value(); },
885              *                 gradientFY: function() { return fx.Value(); },
886              *                 gradientFR: function() { return fr.Value(); },
887              *                 gradientStartOffset: function() { return o1.Value(); },
888              *                 gradientEndOffset: function() { return o2.Value(); },
889              *                 hasInnerPoints: true
890              *     });
891              *
892              * </pre><div id="JXG6081ca7f-0d09-4525-87ac-325a02fe2225" class="jxgbox" style="width: 300px; height: 300px;"></div>
893              * <script type="text/javascript">
894              *     (function() {
895              *         var board = JXG.JSXGraph.initBoard('JXG6081ca7f-0d09-4525-87ac-325a02fe2225',
896              *             {boundingbox: [-1.5, 4.5, 5, -1.5], axis: true, showcopyright: false, shownavigation: false});
897              *         var cx = board.create('slider', [[0, -.2], [3.5, -.2], [0, 0.5, 1]], {name: 'cx, cy'});
898              *         var fx = board.create('slider', [[0, -.4], [3.5, -.4], [0, 0.5, 1]], {name: 'fx, fy'});
899              *         var o1 = board.create('slider', [[0, -.6], [3.5, -.6], [0, 0.0, 1]], {name: 'offset1'});
900              *         var o2 = board.create('slider', [[0, -.8], [3.5, -.8], [0, 1, 1]], {name: 'offset2'});
901              *         var r = board.create('slider', [[0, -1], [3.5, -1], [0, 0.5, 1]], {name: 'r'});
902              *         var fr = board.create('slider', [[0, -1.2], [3.5, -1.2], [0, 0, 1]], {name: 'fr'});
903              *
904              *         var pol = board.create('polygon', [[0, 0], [4, 0], [4,4], [0,4]], {
905              *                     fillOpacity: 1,
906              *                     fillColor: 'yellow',
907              *                     gradient: 'radial',
908              *                     gradientSecondColor: 'blue',
909              *                     gradientCX: function() { return cx.Value(); },
910              *                     gradientCY: function() { return cx.Value(); },
911              *                     gradientR: function() { return r.Value(); },
912              *                     gradientFX: function() { return fx.Value(); },
913              *                     gradientFY: function() { return fx.Value(); },
914              *                     gradientFR: function() { return fr.Value(); },
915              *                     gradientStartOffset: function() { return o1.Value(); },
916              *                     gradientEndOffset: function() { return o2.Value(); },
917              *                     hasInnerPoints: true
918              *         });
919              *
920              *     })();
921              *
922              * </script><pre>
923              *
924              *
925              * @type String
926              * @name JXG.GeometryElement#gradient
927              * @see JXG.GeometryElement#gradientSecondColor
928              * @see JXG.GeometryElement#gradientSecondOpacity
929              * @default null
930              */
931             gradient: null,
932 
933             /**
934              * Second color for gradient.
935              * @type String
936              * @name JXG.GeometryElement#gradientSecondColor
937              * @see JXG.GeometryElement#gradient
938              * @see JXG.GeometryElement#gradientSecondOpacity
939              * @default '#ffffff'
940              */
941             gradientSecondColor: '#ffffff',
942 
943             /**
944              * Opacity of second gradient color. Takes a value between 0 and 1.
945              * @type Number
946              * @name JXG.GeometryElement#gradientSecondOpacity
947              * @see JXG.GeometryElement#gradient
948              * @see JXG.GeometryElement#gradientSecondColor
949              * @default 1
950              */
951             gradientSecondOpacity: 1,
952 
953             /**
954              * The gradientStartOffset attribute is a number (ranging from 0 to 1) which indicates where the first gradient stop is placed,
955              * see the SVG specification for more information.
956              * For linear gradients, this attribute represents a location along the gradient vector.
957              * For radial gradients, it represents a percentage distance from (fx,fy) to the edge of the outermost/largest circle.
958              * @type Number
959              * @name JXG.GeometryElement#gradientStartOffset
960              * @see JXG.GeometryElement#gradient
961              * @see JXG.GeometryElement#gradientEndOffset
962              * @default 0.0
963              */
964             gradientStartOffset: 0.0,
965 
966             /**
967              * The gradientEndOffset attribute is a number (ranging from 0 to 1) which indicates where the second gradient stop is placed,
968              * see the SVG specification for more information.
969              * For linear gradients, this attribute represents a location along the gradient vector.
970              * For radial gradients, it represents a percentage distance from (fx,fy) to the edge of the outermost/largest circle.
971              * @type Number
972              * @name JXG.GeometryElement#gradientEndOffset
973              * @see JXG.GeometryElement#gradient
974              * @see JXG.GeometryElement#gradientStartOffset
975              * @default 1.0
976              */
977             gradientEndOffset: 1.0,
978 
979 
980             /**
981              * Angle (in radians) of the gradiant in case the gradient is of type 'linear'.
982              * If the angle is 0, the first color is on the left and the second color is on the right.
983              * If the angle is pi/4 the first color is on top and the second color at the
984              * bottom.
985              * @type Number
986              * @name JXG.GeometryElement#gradientAngle
987              * @see JXG.GeometryElement#gradient
988              * @default 0
989              */
990             gradientAngle: 0,
991 
992             /**
993              * From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient.
994              * The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle.
995              * For radial gradients in canvas this is the value 'x1'.
996              * Takes a value between 0 and 1.
997              * @type Number
998              * @name JXG.GeometryElement#gradientCX
999              * @see JXG.GeometryElement#gradient
1000              * @see JXG.GeometryElement#gradientCY
1001              * @see JXG.GeometryElement#gradientR
1002              * @default 0.5
1003              */
1004             gradientCX: 0.5,
1005 
1006             /**
1007              * From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient.
1008              * The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle.
1009              * For radial gradients in canvas this is the value 'y1'.
1010              * Takes a value between 0 and 1.
1011              * @type Number
1012              * @name JXG.GeometryElement#gradientCY
1013              * @see JXG.GeometryElement#gradient
1014              * @see JXG.GeometryElement#gradientCX
1015              * @see JXG.GeometryElement#gradientR
1016              * @default 0.5
1017              */
1018             gradientCY: 0.5,
1019 
1020             /**
1021              * From the SVG specification: ‘cx’, ‘cy’ and ‘r’ define the largest (i.e., outermost) circle for the radial gradient.
1022              * The gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this largest (i.e., outermost) circle.
1023              * For radial gradients in canvas this is the value 'r1'.
1024              * Takes a value between 0 and 1.
1025              * @type Number
1026              * @name JXG.GeometryElement#gradientR
1027              * @see JXG.GeometryElement#gradient
1028              * @see JXG.GeometryElement#gradientCX
1029              * @see JXG.GeometryElement#gradientCY
1030              * @default 0.5
1031              */
1032             gradientR: 0.5,
1033 
1034             /**
1035              * ‘fx’ and ‘fy’ define the focal point for the radial gradient.
1036              * The gradient will be drawn such that the 0% gradient stop is mapped to (fx, fy).
1037              * For radial gradients in canvas this is the value 'x0'.
1038              * Takes a value between 0 and 1.
1039              * @type Number
1040              * @name JXG.GeometryElement#gradientFX
1041              * @see JXG.GeometryElement#gradient
1042              * @see JXG.GeometryElement#gradientFY
1043              * @see JXG.GeometryElement#gradientFR
1044              * @default 0.5
1045              */
1046             gradientFX: 0.5,
1047 
1048             /**
1049              * y-coordinate of the circle center for the second color in case of gradient 'radial'. (The attribute fy in SVG)
1050              * For radial gradients in canvas this is the value 'y0'.
1051              * Takes a value between 0 and 1.
1052              * @type Number
1053              * @name JXG.GeometryElement#gradientFY
1054              * @see JXG.GeometryElement#gradient
1055              * @see JXG.GeometryElement#gradientFX
1056              * @see JXG.GeometryElement#gradientFR
1057              * @default 0.5
1058              */
1059             gradientFY: 0.5,
1060 
1061             /**
1062              * This attribute defines the radius of the start circle of the radial gradient.
1063              * The gradient will be drawn such that the 0% <stop> is mapped to the perimeter of the start circle.
1064              * For radial gradients in canvas this is the value 'r0'.
1065              * Takes a value between 0 and 1.
1066              * @type Number
1067              * @name JXG.GeometryElement#gradientFR
1068              * @see JXG.GeometryElement#gradient
1069              * @see JXG.GeometryElement#gradientFX
1070              * @see JXG.GeometryElement#gradientFY
1071              * @default 0.0
1072              */
1073             gradientFR: 0.0,
1074 
1075             /**
1076              * Transition duration (in milliseconds) for color and opacity
1077              * changes. Works in SVG renderer, only.
1078              * @type Number
1079              * @name JXG.GeometryElement#transitionDuration
1080              * @see JXG.GeometryElement#strokeColor
1081              * @see JXG.GeometryElement#highlightStrokeColor
1082              * @see JXG.GeometryElement#strokeOpacity
1083              * @see JXG.GeometryElement#highlightStrokeOpacity
1084              * @see JXG.GeometryElement#fillColor
1085              * @see JXG.GeometryElement#highlightFillColor
1086              * @see JXG.GeometryElement#fillOpacity
1087              * @see JXG.GeometryElement#highlightFillOpacity
1088              * @default {@link JXG.Options.elements#transitionDuration}
1089              */
1090             transitionDuration: 100,
1091 
1092             /**
1093              * Width of the element's stroke.
1094              * @type Number
1095              * @name JXG.GeometryElement#strokeWidth
1096              * @see JXG.GeometryElement#strokeColor
1097              * @see JXG.GeometryElement#highlightStrokeColor
1098              * @see JXG.GeometryElement#strokeOpacity
1099              * @see JXG.GeometryElement#highlightStrokeOpacity
1100              * @default {@link JXG.Options.elements#strokeWidth}
1101              */
1102             strokeWidth: 2,
1103 
1104             /**
1105              * Width of the element's stroke when the mouse is pointed over it.
1106              * @type Number
1107              * @name JXG.GeometryElement#highlightStrokeWidth
1108              * @see JXG.GeometryElement#strokeColor
1109              * @see JXG.GeometryElement#highlightStrokeColor
1110              * @see JXG.GeometryElement#strokeOpacity
1111              * @see JXG.GeometryElement#highlightStrokeOpacity
1112              * @see JXG.GeometryElement#highlightFillColor
1113              * @default {@link JXG.Options.elements#strokeWidth}
1114              */
1115             highlightStrokeWidth: 2,
1116 
1117             /**
1118              * If true the element is fixed and can not be dragged around. The element
1119              * will be repositioned on zoom and moveOrigin events.
1120              * @type Boolean
1121              * @default false
1122              * @name JXG.GeometryElement#fixed
1123              */
1124             fixed: false,
1125 
1126             /**
1127              * If true the element is fixed and can not be dragged around. The element
1128              * will even stay at its position on zoom and moveOrigin events.
1129              * Only free elements like points, texts, curves can be frozen.
1130              * @type Boolean
1131              * @default false
1132              * @name JXG.GeometryElement#frozen
1133              */
1134             frozen: false,
1135 
1136             /**
1137              * If true a label will display the element's name.
1138              * @type Boolean
1139              * @default false
1140              * @name JXG.GeometryElement#withLabel
1141              */
1142             withLabel: false,
1143 
1144             /**
1145              * If false the element won't be visible on the board, otherwise it is shown.
1146              * @type Boolean
1147              * @name JXG.GeometryElement#visible
1148              * @see JXG.GeometryElement#hideElement
1149              * @see JXG.GeometryElement#showElement
1150              * @default true
1151              */
1152             visible: true,
1153 
1154             /**
1155              * A private element will be inaccessible in certain environments, e.g. a graphical user interface.
1156              * @default false
1157              */
1158             priv: false,
1159 
1160             /**
1161              * Display layer which will contain the element.
1162              * @see JXG.Options#layer
1163              * @default See {@link JXG.Options#layer}
1164              */
1165             layer: 0,
1166 
1167             /**
1168              * Determines the elements border-style.
1169              * Possible values are:
1170              * <ul><li>0 for a solid line</li>
1171              * <li>1 for a dotted line</li>
1172              * <li>2 for a line with small dashes</li>
1173 
1174 
1175              * <li>3 for a line with medium dashes</li>
1176              * <li>4 for a line with big dashes</li>
1177              * <li>5 for a line with alternating medium and big dashes and large gaps</li>
1178              * <li>6 for a line with alternating medium and big dashes and small gaps</li></ul>
1179              * @type Number
1180              * @name JXG.GeometryElement#dash
1181              * @default 0
1182              */
1183             dash: 0,
1184 
1185             /**
1186              * If true the element will get a shadow.
1187              * @type Boolean
1188              * @name JXG.GeometryElement#shadow
1189              * @default false
1190              */
1191             shadow: false,
1192 
1193             /**
1194              * If true the element will be traced, i.e. on every movement the element will be copied
1195              * to the background. Use {@link JXG.GeometryElement#clearTrace} to delete the trace elements.
1196              *
1197              * The calling of element.setAttribute({trace:false}) additionally
1198              * deletes all traces of this element. By calling
1199              * element.setAttribute({trace:'pause'})
1200              * the removal of already existing traces can be prevented.
1201              * @see JXG.GeometryElement#clearTrace
1202              * @see JXG.GeometryElement#traces
1203              * @see JXG.GeometryElement#numTraces
1204              * @type Boolean|String
1205              * @default false
1206              * @name JXG.GeometryElement#trace
1207              */
1208             trace: false,
1209 
1210             /**
1211              * Extra visual properties for traces of an element
1212              * @type Object
1213              * @see JXG.GeometryElement#trace
1214              * @name JXG.GeometryElement#traceAttributes
1215              */
1216             traceAttributes: {},
1217 
1218             /**
1219              *
1220              * @type Boolean
1221              * @default true
1222              * @name JXG.GeometryElement#highlight
1223              */
1224             highlight: true,
1225 
1226             /**
1227              * If this is set to true, the element is updated in every update
1228              * call of the board. If set to false, the element is updated only after
1229              * zoom events or more generally, when the bounding box has been changed.
1230              * Examples for the latter behaviour should be axes.
1231              * @type Boolean
1232              * @default true
1233              * @see JXG.GeometryElement#needsRegularUpdate
1234              * @name JXG.GeometryElement#needsRegularUpdate
1235              */
1236             needsRegularUpdate: true,
1237 
1238             /**
1239              * Snaps the element or its parents to the grid. Currently only relevant for points, circles,
1240              * and lines. Points are snapped to grid directly, on circles and lines it's only the parent
1241              * points that are snapped
1242              * @type Boolean
1243              * @default false
1244              * @name JXG.GeometryElement#snapToGrid
1245              */
1246             snapToGrid: false,
1247 
1248             /**
1249              * Determines whether two-finger manipulation of this object may change its size.
1250              * If set to false, the object is only rotated and translated.
1251              * <p>
1252              * In case the element is a horizontal or vertical line having ticks, "scalable:true"
1253              * enables zooming of the board by dragging ticks lines. This feature is enabled,
1254              * for the ticks element of the line element the attribute "fixed" has to be false
1255              * and the line element's scalable attribute has to be true.
1256              * <p>
1257              * In case the element is a polygon or line and it has the attribute "scalable:false",
1258              * moving the element with two fingers results in a rotation or translation.
1259              *
1260              * @type Boolean
1261              * @default true
1262              * @name JXG.GeometryElement#scalable
1263              * @see JXG.Ticks#fixed
1264              */
1265             scalable: true,
1266 
1267             /**
1268              * If the element is dragged it will be moved on mousedown or touchstart to the
1269              * top of its layer. Works only for SVG renderer and for simple elements
1270              * consisting of one SVG node.
1271              * @example
1272              * var li1 = board.create('line', [1, 1, 1], {strokeWidth: 20, dragToTopOfLayer: true});
1273              * var li2 = board.create('line', [1, -1, 1], {strokeWidth: 20, strokeColor: 'red'});
1274              *
1275              * </pre><div id="JXG38449fee-1ab4-44de-b7d1-43caa1f50f86" class="jxgbox" style="width: 300px; height: 300px;"></div>
1276              * <script type="text/javascript">
1277              *     (function() {
1278              *         var board = JXG.JSXGraph.initBoard('JXG38449fee-1ab4-44de-b7d1-43caa1f50f86',
1279              *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
1280              *     var li1 = board.create('line', [1, 1, 1], {strokeWidth: 20, dragToTopOfLayer: true});
1281              *     var li2 = board.create('line', [1, -1, 1], {strokeWidth: 20, strokeColor: 'red'});
1282              *
1283              *     })();
1284              *
1285              * </script><pre>
1286              *
1287              * @type Boolean
1288              * @default false
1289              * @name JXG.GeometryElement#dragToTopOfLayer
1290              */
1291             dragToTopOfLayer: false,
1292 
1293             /**
1294              * Precision options for JSXGraph elements.
1295              * This attributes takes either the value 'inherit' or an object of the form:
1296              * <pre>
1297              * precision: {
1298              *      touch: 15,
1299              *      mouse: 4,
1300              *      pen: 4
1301              * }
1302              * </pre>
1303              *
1304              * In the first case, the global, JSXGraph-wide values of JXGraph.Options.precision
1305              * are taken.
1306              *
1307              * @type {String|Object}
1308              * @name JXG.GeometryElement#precision
1309              * @see JXG.Options#precision
1310              * @default 'inherit'
1311              */
1312             precision: 'inherit',
1313 
1314             /*draft options */
1315             draft: {
1316                 /**
1317                  * If true the element will be drawn in grey scale colors to visualize that it's only a draft.
1318                  * @type Boolean
1319                  * @name JXG.GeometryElement#draft
1320                  * @default {@link JXG.Options.elements.draft#draft}
1321                  */
1322                 draft: false,
1323                 strokeColor: '#565656',
1324                 fillColor: '#565656',
1325                 strokeOpacity: 0.8,
1326                 fillOpacity: 0.8,
1327                 strokeWidth: 1
1328             },
1329 
1330             /**
1331              * @private
1332              * By default, an element is not a label. Do not change this.
1333              */
1334             isLabel: false
1335             // close the meta tag
1336             /**#@-*/
1337         },
1338 
1339          /*
1340           *  Generic options used by {@link JXG.Ticks}
1341           */
1342         ticks: {
1343             /**#@+
1344              * @visprop
1345              */
1346 
1347             /**
1348              * A function that expects two {@link JXG.Coords}, the first one representing the coordinates of the
1349              * tick that is to be labeled, the second one the coordinates of the center (the tick with position 0).
1350              *
1351              * @type function
1352              * @name Ticks#generateLabelText
1353              */
1354             generateLabelText: null,
1355 
1356             /**
1357              * A function that expects two {@link JXG.Coords}, the first one representing the coordinates of the
1358              * tick that is to be labeled, the second one the coordinates of the center (the tick with position 0).
1359              *
1360              * @deprecated Use {@link JGX.Options@generateLabelValue}
1361              * @type function
1362              * @name Ticks#generateLabelValue
1363              */
1364             generateLabelValue: null,
1365 
1366             /**
1367              * Draw labels yes/no
1368              *
1369              * @type Boolean
1370              * @name Ticks#drawLabels
1371              * @default false
1372              */
1373             drawLabels: false,
1374 
1375             /**
1376              * Attributes for the ticks labels
1377              *
1378              * @name Ticks#label
1379              * @type {Object}
1380              * @default {}
1381              *
1382              */
1383             label: {
1384             },
1385 
1386             /**
1387             * Format tick labels that were going to have scientific notation
1388             * like 5.00e+6 to look like 5•10⁶.
1389             *
1390             * @example
1391             * var board = JXG.JSXGraph.initBoard("jxgbox", {
1392             *     boundingbox: [-500000, 500000, 500000, -500000],
1393             *     axis: true,
1394             *     defaultAxes: {
1395             *         x: {
1396             *             scalable: true,
1397             *             ticks: {
1398             *                 beautifulScientificTickLabels: true
1399             *           },
1400             *         },
1401             *         y: {
1402             *             scalable: true,
1403             *             ticks: {
1404             *                 beautifulScientificTickLabels: true
1405             *           },
1406             *         }
1407             *     },
1408             * });
1409             *
1410             * </pre><div id="JXGc1e46cd1-e025-4002-80aa-b450869fdaa2" class="jxgbox" style="width: 300px; height: 300px;"></div>
1411             * <script type="text/javascript">
1412             *     (function() {
1413             *     var board = JXG.JSXGraph.initBoard('JXGc1e46cd1-e025-4002-80aa-b450869fdaa2', {
1414             *         boundingbox: [-500000, 500000, 500000, -500000],
1415             *         showcopyright: false, shownavigation: false,
1416             *         axis: true,
1417             *         defaultAxes: {
1418             *             x: {
1419             *                 scalable: true,
1420             *                 ticks: {
1421             *                     beautifulScientificTickLabels: true
1422             *               },
1423             *             },
1424             *             y: {
1425             *                 scalable: true,
1426             *                 ticks: {
1427             *                     beautifulScientificTickLabels: true
1428             *               },
1429             *             }
1430             *         },
1431             *     });
1432             * 
1433             *     })();
1434             * 
1435             * </script><pre>
1436             *
1437             * @name Ticks#beautifulScientificTickLabels
1438             * @type Boolean
1439             * @default false
1440             */
1441             beautifulScientificTickLabels: false,
1442 
1443             /**
1444              * Use the unicode character 0x2212, i.e. the HTML entity &minus; as minus sign.
1445              * That is −1 instead of -1.
1446              *
1447              * @type Boolean
1448              * @name Ticks#useUnicodeMinus
1449              * @default true
1450              */
1451             useUnicodeMinus: true,
1452 
1453             /**
1454              * Determine the position of the tick with value 0. 'left' means point1 of the line, 'right' means point2,
1455              * and 'middle' is equivalent to the midpoint of the defining points. This attribute is ignored if the parent
1456              * line is of type axis.
1457              *
1458              * @type String
1459              * @name Ticks#anchor
1460              * @default 'left'
1461              */
1462             anchor: 'left',
1463 
1464             /**
1465              * Draw the zero tick, that lies at line.point1?
1466              *
1467              * @type Boolean
1468              * @name Ticks#drawZero
1469              * @default false
1470              */
1471             drawZero: false,
1472 
1473             /**
1474              * If the distance between two ticks is too big we could insert new ticks. If insertTicks
1475              * is <tt>true</tt>, we'll do so, otherwise we leave the distance as is.
1476              * This option is ignored if equidistant is false. In the example below the distance between
1477              * two ticks is given as <tt>1</tt> but because insertTicks is set to true many ticks will
1478              * be omitted in the rendering process to keep the display clear.
1479              *
1480              * @type Boolean
1481              * @name Ticks#insertTicks
1482              * @see Ticks#minTicksDistance
1483              * @default false
1484              * @example
1485              * // Create an axis providing two coord pairs.
1486              *   var p1 = board.create('point', [0, 0]);
1487              *   var p2 = board.create('point', [50, 25]);
1488              *   var l1 = board.create('line', [p1, p2]);
1489              *   var t = board.create('ticks', [l1, 1], {
1490              *      insertTicks: true,
1491              *      majorHeight: -1,
1492              *      label: {
1493              *          offset: [4, -9]
1494              *      },
1495              *      drawLabels: true
1496              *  });
1497              * </pre><div class="jxgbox" id="JXG2f6fb842-40bd-4223-aa28-3e9369d2097f" style="width: 300px; height: 300px;"></div>
1498              * <script type="text/javascript">
1499              * (function () {
1500              *   var board = JXG.JSXGraph.initBoard('JXG2f6fb842-40bd-4223-aa28-3e9369d2097f', {boundingbox: [-100, 70, 70, -100], showcopyright: false, shownavigation: false});
1501              *   var p1 = board.create('point', [0, 0]);
1502              *   var p2 = board.create('point', [50, 25]);
1503              *   var l1 = board.create('line', [p1, p2]);
1504              *   var t = board.create('ticks', [l1, 1], {insertTicks: true, majorHeight: -1, label: {offset: [4, -9]}, drawLabels: true});
1505              * })();
1506              * </script><pre>
1507              */
1508             insertTicks: false,
1509 
1510             /**
1511              * Minimum distance in pixel of equidistant ticks in case insertTicks==true.
1512              * @name Ticks#minTicksDistance
1513              * @type: Number
1514              * @default: 10
1515              * @see Ticks#insertTicks
1516              */
1517             minTicksDistance: 10,
1518 
1519             /**
1520              * Total height of a minor tick. If negative the full height of the board is taken.
1521              *
1522              * @type Number
1523              * @name Ticks#minorHeight
1524              * @default 4
1525              */
1526             minorHeight: 4,
1527 
1528             /**
1529              * Total height of a major tick. If negative the full height of the board is taken.
1530              *
1531              * @type Number
1532              * @name Ticks#majorHeight
1533              * @default 10
1534              */
1535             majorHeight: 10,
1536 
1537             /**
1538              * Decides in which direction finite ticks are visible. Possible values are either the constants
1539              * 0=false or 1=true or a function returning 0 or 1.
1540              *
1541              * In case of [0,1] the tick is only visible to the right of the line. In case of
1542              * [1,0] the tick is only visible to the left of the line.
1543              *
1544              * @type Array
1545              * @name Ticks#tickEndings
1546              * @default [1, 1]
1547              */
1548             tickEndings: [1, 1],
1549 
1550             /**
1551              * The number of minor ticks between two major ticks.
1552              * @type Number
1553              * @name Ticks#minorTicks
1554              * @default 4
1555              */
1556             minorTicks: 4,
1557 
1558             /**
1559              * Scale the ticks but not the tick labels.
1560              * @type Number
1561              * @default 1
1562              * @name Ticks#scale
1563              * @see Ticks#scaleSymbol
1564              */
1565             scale: 1,
1566 
1567             /**
1568              * A string that is appended to every tick, used to represent the scale
1569              * factor given in {@link Ticks#scaleSymbol}.
1570              *
1571              * @type String
1572              * @default ''
1573              * @name Ticks#scaleSymbol
1574              * @see Ticks#scale
1575              */
1576             scaleSymbol: '',
1577 
1578             /**
1579              * User defined labels for special ticks. Instead of the i-th tick's position, the i-th string stored in this array
1580              * is shown. If the number of strings in this array is less than the number of special ticks, the tick's position is
1581              * shown as a fallback.
1582              *
1583              * @type Array
1584              * @name Ticks#labels
1585              * @default []
1586              */
1587             labels: [],
1588 
1589             /**
1590              * The maximum number of characters a tick label can use.
1591              *
1592              * @type Number
1593              * @name Ticks#maxLabelLength
1594              * @see Ticks#precision
1595              * @default 5
1596              */
1597             maxLabelLength: 5,
1598 
1599             /**
1600              * If a label exceeds {@link Ticks#maxLabelLength} this determines the precision used to shorten the tick label.
1601              *
1602              * @type Number
1603              * @name Ticks#precision
1604              * @see Ticks#maxLabelLength
1605              * @default 3
1606              */
1607             precision: 3,
1608 
1609             /**
1610              * The default distance between two ticks. Please be aware that this value does not have
1611              * to be used if {@link Ticks#insertTicks} is set to true.
1612              *
1613              * @type Number
1614              * @name Ticks#ticksDistance
1615              * @see Ticks#insertTicks
1616              * @default 1
1617              */
1618             ticksDistance: 1,
1619 
1620             /**
1621              * Tick face for ticks of finite length.  By default (face: '|') this is a straight line.
1622              * Possible other values are '<' and '>'. These faces are used in
1623              * {@link JXG.Hatch} for hatch marking parallel lines.
1624              * @type {String}
1625              * @name{Ticks#face}
1626              * @see hatch
1627              * @default '|'
1628              * @example
1629              *   var p1 = board.create('point', [0, 3]);
1630              *   var p2 = board.create('point', [1, 3]);
1631              *   var l1 = board.create('line', [p1, p2]);
1632              *   var t = board.create('ticks', [l1], {ticksDistance: 2, face: '>'});
1633              *
1634              * </pre><div id="JXG950a568a-1264-4e3a-b61d-b6881feecf4b" class="jxgbox" style="width: 300px; height: 300px;"></div>
1635              * <script type="text/javascript">
1636              *     (function() {
1637              *         var board = JXG.JSXGraph.initBoard('JXG950a568a-1264-4e3a-b61d-b6881feecf4b',
1638              *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
1639              *       var p1 = board.create('point', [0, 3]);
1640              *       var p2 = board.create('point', [1, 3]);
1641              *       var l1 = board.create('line', [p1, p2]);
1642              *       var t = board.create('ticks', [l1], {ticksDistance: 2, face: '>'});
1643              *
1644              *     })();
1645              *
1646              * </script><pre>
1647              *
1648              */
1649             face: '|',
1650 
1651             strokeOpacity: 1,
1652             strokeWidth: 1,
1653             strokeColor: 'black',
1654             highlightStrokeColor: '#888888',
1655             fillColor: 'none',
1656             highlightFillColor: 'none',
1657             visible: 'inherit',
1658 
1659             /**
1660              * Whether line boundaries should be counted or not in the lower and upper bounds when
1661              * creating ticks.
1662              *
1663              * @type Boolean
1664              * @name Ticks#includeBoundaries
1665              * @default false
1666              */
1667             includeBoundaries: false,
1668 
1669             /**
1670              * Set the ticks type.
1671              * Possible values are 'linear' or 'polar'.
1672              *
1673              * @type String
1674              * @name Ticks#type
1675              * @default 'linear'
1676              */
1677             type: 'linear'
1678 
1679             // close the meta tag
1680             /**#@-*/
1681         },
1682 
1683          /*
1684           *  Generic options used by {@link JXG.Hatch}
1685           */
1686         hatch: {
1687             drawLabels: false,
1688             drawZero: true,
1689             majorHeight: 20,
1690             anchor: 'middle',
1691             face: '|',
1692             strokeWidth: 2,
1693             strokeColor: 'blue',
1694             ticksDistance: 0.2
1695         },
1696 
1697         /**
1698          * Precision options, defining how close a pointer device (mouse, finger, pen) has to be
1699          * to an object such that the object is highlighted or can be dragged.
1700          * These values are board-wide and can be overwritten for individual elements by
1701          * changing their precision attribute.
1702          *
1703          * The default values are
1704          * <pre>
1705          * JXG.Options.precision: {
1706          *   touch: 30,
1707          *   touchMax: 100,
1708          *   mouse: 4,
1709          *   pen: 4,
1710          *   epsilon: 0.0001,
1711          *   hasPoint: 4
1712          * }
1713          * </pre>
1714          *
1715          * @type {Object}
1716          * @name JXG.Options#precision
1717          * @see JXG.GeometryElement#precision
1718          */
1719         precision: {
1720             touch: 15,
1721             touchMax: 100,
1722             mouse: 4,
1723             pen: 4,
1724             epsilon: 0.0001, // Unused
1725             hasPoint: 4
1726         },
1727 
1728         /**
1729          * Default ordering of the layers.
1730          * The numbering starts from 0 and the highest layer number is numlayers-1.
1731          *
1732          * The default values are
1733          * <pre>
1734          * JXG.Options.layer: {
1735          *   numlayers: 20, // only important in SVG
1736          *   text: 9,
1737          *   point: 9,
1738          *   glider: 9,
1739          *   arc: 8,
1740          *   line: 7,
1741          *   circle: 6,
1742          *   curve: 5,
1743          *   turtle: 5,
1744          *   polygon: 3,
1745          *   sector: 3,
1746          *   angle: 3,
1747          *   integral: 3,
1748          *   axis: 2,
1749          *   ticks: 2,
1750          *   grid: 1,
1751          *   image: 0,
1752          *   trace: 0
1753          * }
1754          * </pre>
1755          * @type {Object}
1756          * @name JXG.Options#layer
1757          */
1758         layer: {
1759             numlayers: 20, // only important in SVG
1760             unused9: 19,
1761             unused8: 18,
1762             unused7: 17,
1763             unused6: 16,
1764             unused5: 15,
1765             unused4: 14,
1766             unused3: 13,
1767             unused2: 12,
1768             unused1: 11,
1769             unused0: 10,
1770             text: 9,
1771             point: 9,
1772             glider: 9,
1773             arc: 8,
1774             line: 7,
1775             circle: 6,
1776             curve: 5,
1777             turtle: 5,
1778             polygon: 3,
1779             sector: 3,
1780             angle: 3,
1781             integral: 3,
1782             axis: 2,
1783             ticks: 2,
1784             grid: 1,
1785             image: 0,
1786             trace: 0
1787         },
1788 
1789         /* special angle options */
1790         angle: {
1791             /**#@+
1792              * @visprop
1793              */
1794 
1795             withLabel: true,
1796 
1797             /**
1798              * Radius of the sector, displaying the angle.
1799              *
1800              * @type Number
1801              * @name Angle#radius
1802              * @default 0.5
1803              * @visprop
1804              */
1805             radius: 0.5,
1806 
1807             /**
1808              * Display type of the angle field. Possible values are
1809              * 'sector' or 'sectordot' or 'square' or 'none'.
1810              *
1811              * @type String
1812              * @default 'sector'
1813              * @name Angle#type
1814              * @visprop
1815              */
1816             type: 'sector',
1817 
1818             /**
1819              * Display type of the angle field in case of a right angle. Possible values are
1820              * 'sector' or 'sectordot' or 'square' or 'none'.
1821              *
1822              * @type String
1823              * @default square
1824              * @name Angle#orthoType
1825              * @see Angle#orthoSensitivity
1826              * @visprop
1827              */
1828             orthoType: 'square',
1829 
1830             /**
1831              * Sensitivity (in degrees) to declare an angle as right angle.
1832              * If the angle measure is inside this distance from a rigth angle, the orthoType
1833              * of the angle is used for display.
1834              *
1835              * @type Number
1836              * @default 1.0
1837              * @name Angle#orthoSensitivity
1838              * @see Angle#orthoType
1839              * @visprop
1840              */
1841             orthoSensitivity: 1.0,
1842 
1843             fillColor: '#FF7F00',
1844             highlightFillColor: '#FF7F00',
1845             strokeColor: '#FF7F00',
1846             fillOpacity: 0.3,
1847             highlightFillOpacity: 0.3,
1848 
1849             /**
1850              * @deprecated
1851              */
1852             radiuspoint: {
1853                 withLabel: false,
1854                 visible: false,
1855                 name: ''
1856             },
1857 
1858             /**
1859              * @deprecated
1860              */
1861             pointsquare: {
1862                 withLabel: false,
1863                 visible: false,
1864                 name: ''
1865             },
1866 
1867             dot: {
1868                 visible: false,
1869                 strokeColor: 'none',
1870                 fillColor: 'black',
1871                 size: 2,
1872                 face: 'o',
1873                 withLabel: false,
1874                 name: ''
1875             },
1876 
1877             label: {
1878                 position: 'top',
1879                 offset: [0, 0],
1880                 strokeColor: '#0000FF'
1881             },
1882 
1883             /**
1884              * Attributes for sub-element arc. In general, the arc will run through the first point and
1885              * thus will not have the same radius as the angle sector.
1886              *
1887              * @type Arc
1888              * @name Angle#arc
1889              * @default '{visible:false}'
1890              */
1891             arc: {
1892                 visible: false,
1893                 fillColor: 'none'
1894             },
1895 
1896             /**#@-*/
1897         },
1898 
1899         /* special arc options */
1900         arc: {
1901             /**#@+
1902              * @visprop
1903              */
1904 
1905             /**
1906              * Type of arc. Possible values are 'minor', 'major', and 'auto'.
1907              *
1908              * @type String
1909              * @name Arc#selection
1910              * @default 'auto'
1911              */
1912             selection: 'auto',
1913 
1914             /**
1915              * If <tt>true</tt>, moving the mouse over inner points triggers hasPoint.
1916              *
1917              * @see JXG.GeometryElement#hasPoint
1918              * @name Arc#hasInnerPoints
1919              * @type Boolean
1920              * @default false
1921              */
1922             hasInnerPoints: false,
1923 
1924             label: {
1925                 anchorX: 'auto',
1926                 anchorY: 'auto'
1927             },
1928             firstArrow: false,
1929             lastArrow: false,
1930             fillColor: 'none',
1931             highlightFillColor: 'none',
1932             strokeColor: '#0000ff',
1933             highlightStrokeColor: '#C3D9FF',
1934             useDirection: false,
1935 
1936             /**
1937              * Attributes for center point.
1938              *
1939              * @type Point
1940              * @name Arc#center
1941              */
1942             center: {
1943             },
1944 
1945             /**
1946              * Attributes for radius point.
1947              *
1948              * @type Point
1949              * @name Arc#radiusPoint
1950              */
1951             radiusPoint: {
1952             },
1953 
1954             /**
1955              * Attributes for angle point.
1956              *
1957              * @type Point
1958              * @name Arc#anglePoint
1959              */
1960             anglePoint: {
1961             }
1962 
1963             /**#@-*/
1964         },
1965 
1966         /* special arrow options */
1967         arrow: {
1968             /**#@+
1969              * @visprop
1970              */
1971 
1972             firstArrow: false,
1973 
1974             lastArrow: {
1975                 type: 1,
1976                 highlightSize: 6,
1977                 size: 6
1978             }
1979 
1980             /**#@-*/
1981         },
1982 
1983         /* special axis options */
1984         axis: {
1985             /**#@+
1986              * @visprop
1987              */
1988 
1989             name: '',                            // By default, do not generate names for axes.
1990             needsRegularUpdate: false,           // Axes only updated after zooming and moving of the origin.
1991             strokeWidth: 1,
1992             lastArrow: {
1993                 type: 1,
1994                 highlightSize: 8,
1995                 size: 8
1996             },
1997             strokeColor: '#666666',
1998             highlightStrokeWidth: 1,
1999             highlightStrokeColor: '#888888',
2000 
2001 
2002             /**
2003              * Show / hide ticks.
2004              *
2005              * Deprecated. Suggested alternative is "ticks: {visible: false}"
2006              *
2007              * @type Boolean
2008              * @name Axis#withTicks
2009              * @default true
2010              * @deprecated
2011              */
2012             withTicks: true,
2013             straightFirst: true,
2014             straightLast: true,
2015             margin: -4,
2016             withLabel: false,
2017             scalable: false,
2018 
2019             /**
2020              * Attributes for ticks of the axis.
2021              *
2022              * @type Ticks
2023              * @name Axis#ticks
2024              */
2025             ticks: {
2026                 label: {
2027                     offset: [4, -12 + 3],     // This seems to be a good offset for 12 point fonts
2028                     parse: false,
2029                     needsRegularUpdate: false,
2030                     display: 'internal',
2031                     visible: 'inherit',
2032                     layer: 9
2033                 },
2034                 visible: 'inherit',
2035                 needsRegularUpdate: false,
2036                 strokeWidth: 1,
2037                 strokeColor: '#666666',
2038                 highlightStrokeColor: '#888888',
2039                 drawLabels: true,
2040                 drawZero: false,
2041                 insertTicks: true,
2042                 minTicksDistance: 5,
2043                 minorHeight: 10,          // if <0: full width and height
2044                 majorHeight: -1,          // if <0: full width and height
2045                 tickEndings: [0, 1],
2046                 minorTicks: 4,
2047                 ticksDistance: 1,         // TODO doc
2048                 strokeOpacity: 0.25
2049             },
2050 
2051             /**
2052              * Attributes for first point the axis.
2053              *
2054              * @type Point
2055              * @name Axis#point1
2056              */
2057             point1: {                  // Default values for point1 if created by line
2058                 needsRegularUpdate: false,
2059                 visible: false
2060             },
2061 
2062             /**
2063              * Attributes for second point the axis.
2064              *
2065              * @type Point
2066              * @name Axis#point2
2067              */
2068             point2: {                  // Default values for point2 if created by line
2069                 needsRegularUpdate: false,
2070                 visible: false
2071             },
2072 
2073             /**
2074              * Attributes for the axis label.
2075              *
2076              * @type Label
2077              * @name Axis#label
2078              */
2079             label: {
2080                 position: 'lft',
2081                 offset: [10, 10]
2082             }
2083             /**#@-*/
2084         },
2085 
2086         /* special options for angle bisector of 3 points */
2087         bisector: {
2088             /**#@+
2089              * @visprop
2090              */
2091 
2092             strokeColor: '#000000', // Bisector line
2093 
2094             /**
2095              * Attributes for the helper point of the bisector.
2096              *
2097              * @type Point
2098              * @name Bisector#point
2099              */
2100             point: {               // Bisector point
2101                 visible: false,
2102                 fixed: false,
2103                 withLabel: false,
2104                 name: ''
2105             }
2106 
2107             /**#@-*/
2108         },
2109 
2110         /* special options for the 2 bisectors of 2 lines */
2111         bisectorlines: {
2112             /**#@+
2113              * @visprop
2114              */
2115 
2116             /**
2117              * Attributes for first line.
2118              *
2119              * @type Line
2120              * @name Bisectorlines#line1
2121              */
2122             line1: {               //
2123                 strokeColor: 'black'
2124             },
2125 
2126             /**
2127              * Attributes for second line.
2128              *
2129              * @type Line
2130              * @name Bisectorlines#line2
2131              */
2132             line2: {               //
2133                 strokeColor: 'black'
2134             }
2135 
2136             /**#@-*/
2137         },
2138 
2139         /* special button options */
2140         button: {
2141             /**#@+
2142              * @visprop
2143              */
2144 
2145             /**
2146              * Control the attribute "disabled" of the HTML button.
2147              *
2148              * @name disabled
2149              * @memberOf Button.prototype
2150              *
2151              * @type Boolean
2152              * @default false
2153              */
2154             disabled: false,
2155 
2156             display: 'html'
2157 
2158             /**#@-*/
2159         },
2160 
2161         /* special cardinal spline options */
2162         cardinalspline: {
2163             /**#@+
2164              * @visprop
2165              */
2166 
2167              /**
2168               * Controls if the data points of the cardinal spline when given as
2169               * arrays should be converted into {@link JXG.Points}.
2170               *
2171               * @name createPoints
2172               * @memberOf Cardinalspline.prototype
2173               *
2174               * @see Cardinalspline#points
2175               *
2176               * @type Boolean
2177               * @default true
2178               */
2179             createPoints: true,
2180 
2181             /**
2182              * If set to true, the supplied coordinates are interpreted as
2183              * [[x_0, y_0], [x_1, y_1], p, ...].
2184              * Otherwise, if the data consists of two arrays of equal length,
2185              * it is interpreted as
2186              * [[x_o x_1, ..., x_n], [y_0, y_1, ..., y_n]]
2187              *
2188              * @name isArrayOfCoordinates
2189              * @memberOf Cardinalspline.prototype
2190              * @type {Boolean}
2191              * @default false
2192              */
2193             isArrayOfCoordinates: false,
2194 
2195             /**
2196              * Attributes for the points generated by Cardinalspline in cases
2197              * {@link createPoints} is set to true
2198              *
2199              * @name points
2200              * @memberOf Cardinalspline.prototype
2201              *
2202              * @see Cardinalspline#createPoints
2203              * @type Object
2204              */
2205             points: {
2206                 strokeOpacity: 0.05,
2207                 fillOpacity: 0.05,
2208                 highlightStrokeOpacity: 1.0,
2209                 highlightFillOpacity: 1.0,
2210                 withLabel: false,
2211                 name: '',
2212                 fixed: false
2213             }
2214 
2215             /**#@-*/
2216         },
2217 
2218         /* special chart options */
2219         chart: {
2220             /**#@+
2221              * @visprop
2222              */
2223 
2224             chartStyle: 'line',
2225             colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
2226             highlightcolors: null,
2227             fillcolor: null,
2228             highlightonsector: false,
2229             highlightbysize: false,
2230 
2231             fillOpacity: 0.6,
2232             withLines:  false,
2233 
2234             label: {
2235             }
2236             /**#@-*/
2237         },
2238 
2239         /* special html slider options */
2240         checkbox: {
2241             /**#@+
2242              * @visprop
2243              */
2244 
2245             /**
2246              * Control the attribute "disabled" of the HTML checkbox.
2247              *
2248              * @name disabled
2249              * @memberOf Checkbox.prototype
2250              *
2251              * @type Boolean
2252              * @default false
2253              */
2254             disabled: false,
2255 
2256             /**
2257              * Control the attribute "checked" of the HTML checkbox.
2258              *
2259              * @name checked
2260              * @memberOf Checkbox.prototype
2261              *
2262              * @type Boolean
2263              * @default false
2264              */
2265             checked: false,
2266 
2267             display: 'html'
2268 
2269             /**#@-*/
2270         },
2271 
2272         /*special circle options */
2273         circle: {
2274             /**#@+
2275              * @visprop
2276              */
2277 
2278             /**
2279              * If <tt>true</tt>, moving the mouse over inner points triggers hasPoint.
2280              *
2281              * @see JXG.GeometryElement#hasPoint
2282              * @name Circle#hasInnerPoints
2283              * @type Boolean
2284              * @default false
2285              */
2286             hasInnerPoints: false,
2287 
2288             fillColor: 'none',
2289             highlightFillColor: 'none',
2290             strokeColor: '#0000ff',
2291             highlightStrokeColor: '#C3D9FF',
2292 
2293             /**
2294              * Attributes for center point.
2295              *
2296              * @type Point
2297              * @name Circle#center
2298              */
2299             center: {
2300                 visible: false,
2301                 withLabel: false,
2302                 fixed: false,
2303                 name: ''
2304             },
2305 
2306             /**
2307              * Attributes for circle label.
2308              *
2309              * @type Label
2310              * @name Circle#label
2311              */
2312             label: {
2313                 position: 'urt'
2314             }
2315             /**#@-*/
2316         },
2317 
2318         /* special options for circumcircle of 3 points */
2319         circumcircle: {
2320             /**#@+
2321              * @visprop
2322              */
2323 
2324             fillColor: 'none',
2325             highlightFillColor: 'none',
2326             strokeColor: '#0000ff',
2327             highlightStrokeColor: '#C3D9FF',
2328 
2329             /**
2330              * Attributes for center point.
2331              *
2332              * @type Point
2333              * @name Circumcircle#center
2334              */
2335             center: {               // center point
2336                 visible: false,
2337                 fixed: false,
2338                 withLabel: false,
2339                 name: ''
2340             }
2341             /**#@-*/
2342         },
2343 
2344         circumcirclearc: {
2345             /**#@+
2346              * @visprop
2347              */
2348 
2349             fillColor: 'none',
2350             highlightFillColor: 'none',
2351             strokeColor: '#0000ff',
2352             highlightStrokeColor: '#C3D9FF',
2353 
2354             /**
2355              * Attributes for center point.
2356              *
2357              * @type Point
2358              * @name CircumcircleArc#center
2359              */
2360             center: {
2361                 visible: false,
2362                 withLabel: false,
2363                 fixed: false,
2364                 name: ''
2365             }
2366             /**#@-*/
2367         },
2368 
2369         /* special options for circumcircle sector of 3 points */
2370         circumcirclesector: {
2371             /**#@+
2372              * @visprop
2373              */
2374 
2375             useDirection: true,
2376             fillColor: '#00FF00',
2377             highlightFillColor: '#00FF00',
2378             fillOpacity: 0.3,
2379             highlightFillOpacity: 0.3,
2380             strokeColor: '#0000ff',
2381             highlightStrokeColor: '#C3D9FF',
2382 
2383             /**
2384              * Attributes for center point.
2385              *
2386              * @type Point
2387              * @name Circle#point
2388              */
2389             point: {
2390                 visible: false,
2391                 fixed: false,
2392                 withLabel: false,
2393                 name: ''
2394             }
2395             /**#@-*/
2396         },
2397 
2398         /* special conic options */
2399         conic: {
2400             /**#@+
2401              * @visprop
2402              */
2403 
2404             fillColor: 'none',
2405             highlightFillColor: 'none',
2406             strokeColor: '#0000ff',
2407             highlightStrokeColor: '#C3D9FF',
2408 
2409             /**
2410              * Attributes for foci points.
2411              *
2412              * @type Point
2413              * @name Conic#foci
2414              */
2415             foci: {
2416                 // points
2417                 fixed: false,
2418                 visible: false,
2419                 withLabel: false,
2420                 name: ''
2421             },
2422 
2423             /**
2424              * Attributes for center point.
2425              *
2426              * @type Point
2427              * @name Conic#center
2428              */
2429             center: {
2430                 visible: false,
2431                 withLabel: false,
2432                 name: ''
2433             },
2434 
2435             /**
2436              * Attributes for five points defining the conic, if some of them are given as coordinates.
2437              *
2438              * @type Point
2439              * @name Conic#point
2440              */
2441             point: {
2442                 withLabel: false,
2443                 name: ''
2444             },
2445 
2446             /**
2447              * Attributes for parabola line in case the line is given by two
2448              * points or coordinate pairs.
2449              *
2450              * @type Line
2451              * @name Conic#line
2452              */
2453             line: {
2454                 visible: false
2455             }
2456 
2457             /**#@-*/
2458         },
2459 
2460         /* special curve options */
2461         curve: {
2462             strokeWidth: 1,
2463             strokeColor: '#0000ff',
2464             fillColor: 'none',
2465             fixed: true,
2466 
2467             useQDT: false,
2468 
2469             /**#@+
2470              * @visprop
2471              */
2472 
2473             /**
2474              * The data points of the curve are not connected with straight lines but with bezier curves.
2475              * @name Curve#handDrawing
2476              * @type Boolean
2477              * @default false
2478              */
2479             handDrawing: false,
2480 
2481             /**
2482              * The curveType is set in {@link JXG.Curve#generateTerm} and used in {@link JXG.Curve#updateCurve}.
2483              * Possible values are <ul>
2484              * <li>'none'</li>
2485              * <li>'plot': Data plot</li>
2486              * <li>'parameter': we can not distinguish function graphs and parameter curves</li>
2487              * <li>'functiongraph': function graph</li>
2488              * <li>'polar'</li>
2489              * <li>'implicit' (not yet)</li></ul>
2490              * Only parameter and plot are set directly. Polar is set with {@link JXG.GeometryElement#setAttribute} only.
2491              * @name Curve#curveType
2492              * @type String
2493              * @default null
2494              */
2495             curveType: null,
2496 
2497             /**
2498              * Apply Ramer-Douglas-Peuker smoothing.
2499              *
2500              * @type Boolean
2501              * @name Curve#RDPsmoothing
2502              * @default false
2503              */
2504             RDPsmoothing: false,     // Apply the Ramer-Douglas-Peuker algorithm
2505 
2506             /**
2507              * Number of points used for plotting triggered by up events
2508              * (i.e. high quality plotting) in case
2509              * {@link Curve#doAdvancedPlot} is false.
2510              *
2511              * @name Curve#numberPointsHigh
2512              * @see Curve#doAdvancedPlot
2513              * @type Number
2514              * @default 1600
2515              */
2516             numberPointsHigh: 1600,  // Number of points on curves after mouseUp
2517 
2518             /**
2519              * Number of points used for plotting triggered by move events
2520              * (i.e. lower quality plotting but fast) in case
2521              * {@link Curve#doAdvancedPlot} is false.
2522              *
2523              * @name Curve#numberPointsLow
2524              * @see Curve#doAdvancedPlot
2525              * @type Number
2526              * @default 400
2527              */
2528             numberPointsLow: 400,    // Number of points on curves after mousemove
2529 
2530             /**
2531              * If true use a recursive bisection algorithm.
2532              * It is slower, but usually the result is better. It tries to detect jumps
2533              * and singularities.
2534              *
2535              * @name Curve#doAdvancedPlot
2536              * @type Boolean
2537              * @default true
2538              */
2539             doAdvancedPlot: true,
2540 
2541             /**
2542              *
2543              * Recursion depth used for plotting triggered by up events
2544              * (i.e. high quality plotting) in case
2545              * {@link Curve#doAdvancedPlot} is true.
2546              *
2547              * @name Curve#recursionDepthHigh
2548              * @see Curve#doAdvancedPlot
2549              * @type Number
2550              * @default 17
2551              */
2552              recursionDepthHigh: 17,
2553 
2554             /**
2555              * Number of points used for plotting triggered by move events in case
2556              * (i.e. lower quality plotting but fast)
2557              * {@link Curve#doAdvancedPlot} is true.
2558              *
2559              * @name Curve#recursionDepthLow
2560              * @see Curve#doAdvancedPlot
2561              * @type Number
2562              * @default 13
2563              */
2564              recursionDepthLow: 15,
2565 
2566             /**
2567              * If true use the algorithm by Gillam and Hohenwarter, which was default until version 0.98.
2568              *
2569              * @name Curve#doAdvancedPlotOld
2570              * @see Curve#doAdvancedPlot
2571              * @type Boolean
2572              * @default false
2573              * @deprecated
2574              */
2575             doAdvancedPlotOld: false,   // v1
2576 
2577             /**
2578              * Select the version of the plot algorithm.
2579              * <ul>
2580              * <li> Version 1 is very outdated
2581              * <li> Version 2 is the default version in JSXGraph v0.99.*, v1.0, and v1.1, v1.2.0
2582              * <li> Version 3 is an internal version that was never published in  a stable version.
2583              * <li> Version 4 is available since JSXGraph v1.2.0
2584              * </ul>
2585              * Version 4 plots correctly logarithms if the function term is supplied as string (i.e. as JessieCode)
2586              *
2587              * @example
2588              *   var c = board.create('functiongraph', ["log(x)"]);
2589              *
2590              * @name Curve#plotVersion
2591              * @type Number
2592              * @default 2
2593              */
2594             plotVersion: 2,
2595 
2596             /**
2597              * Attributes for circle label.
2598              *
2599              * @type Label
2600              * @name Circle#label
2601              */
2602             label: {
2603                 position: 'lft'
2604             },
2605 
2606             /**
2607              * Curve has an arrow head at the start position.
2608              *
2609              * @name Line#firstArrow for options
2610              * @type Boolean / Object
2611              * @default false
2612              */
2613             firstArrow: false,
2614 
2615             /**
2616              * Curve has an arrow head at the end position.
2617              *
2618              * @see Line#lastArrow for options
2619              * @type Boolean / Object
2620              * @default false
2621              */
2622             lastArrow: false
2623 
2624             /**#@-*/
2625         },
2626 
2627         glider: {
2628             /**#@+
2629              * @visprop
2630              */
2631 
2632             label: {}
2633             /**#@-*/
2634         },
2635 
2636         /* special grid options */
2637         grid: {
2638             /**#@+
2639              * @visprop
2640              */
2641 
2642             /* grid styles */
2643             needsRegularUpdate: false,
2644             hasGrid: false,
2645             gridX: 1,
2646             gridY: 1,
2647             //strokeColor: '#C0C0C0',
2648             strokeColor: '#C0C0C0',
2649             strokeOpacity: 0.5,
2650             strokeWidth: 1,
2651             dash: 0,    // dashed grids slow down the iPad considerably
2652             /* snap to grid options */
2653 
2654             /**
2655              * @deprecated
2656              */
2657             snapToGrid: false,
2658             /**
2659              * @deprecated
2660              */
2661             snapSizeX: 10,
2662             /**
2663              * @deprecated
2664              */
2665             snapSizeY: 10
2666 
2667             /**#@-*/
2668         },
2669 
2670         group: {
2671             needsRegularUpdate: true
2672         },
2673 
2674         /* special html slider options */
2675         htmlslider: {
2676             /**#@+
2677              * @visprop
2678              */
2679 
2680             /**
2681              *
2682              * These affect the DOM element input type="range".
2683              * The other attributes affect the DOM element div containing the range element.
2684              */
2685             widthRange: 100,
2686             widthOut: 34,
2687             step: 0.01,
2688 
2689             frozen: true,
2690             isLabel: false,
2691             strokeColor: 'black',
2692             display: 'html',
2693             anchorX: 'left',
2694             anchorY: 'middle',
2695             withLabel: false
2696 
2697             /**#@-*/
2698         },
2699 
2700         /* special image options */
2701         image: {
2702             /**#@+
2703              * @visprop
2704              */
2705 
2706             imageString: null,
2707             fillOpacity: 1.0,
2708             highlightFillOpacity: 0.6,
2709 
2710 
2711             /**
2712              * Defines the CSS class used by the image. CSS attributes defined in
2713              * this class will overwrite the corresponding JSXGraph attributes, e.g.
2714              * opacity.
2715              * The default CSS class is defined in jsxgraph.css.
2716              *
2717              * @name Image#cssClass
2718              *
2719              * @see Image#highlightCssClass
2720              * @type String
2721              * @default 'JXGimage'
2722              */
2723             cssClass: 'JXGimage',
2724 
2725             /**
2726              * Defines the CSS class used by the image when highlighted.
2727              * CSS attributes defined in this class will overwrite the
2728              * corresponding JSXGraph attributes, e.g. highlightFillOpacity.
2729              * The default CSS class is defined in jsxgraph.css.
2730              *
2731              * @name Image#highlightCssClass
2732              *
2733              * @see Image#cssClass
2734              * @type String
2735              * @default 'JXGimageHighlight'
2736              */
2737             highlightCssClass: 'JXGimageHighlight',
2738 
2739             /**
2740              * Image rotation in degrees.
2741              *
2742              * @name Image#rotate
2743              * @type Number
2744              * @default 0
2745              */
2746             rotate: 0,
2747 
2748             /**
2749              * Defines together with {@link Image#snapSizeY} the grid the image snaps on to.
2750              * The image will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
2751              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
2752              * of the default ticks of the default x axes of the board.
2753              *
2754              * @name Image#snapSizeX
2755              *
2756              * @see Point#snapToGrid
2757              * @see Image#snapSizeY
2758              * @see JXG.Board#defaultAxes
2759              * @type Number
2760              * @default 1
2761              */
2762             snapSizeX: 1,
2763 
2764             /**
2765              * Defines together with {@link Image#snapSizeX} the grid the image snaps on to.
2766              * The image will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
2767              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
2768              * of the default ticks of the default y axes of the board.
2769              *
2770              * @name Image#snapSizeY
2771              *
2772              * @see Point#snapToGrid
2773              * @see Image#snapSizeX
2774              * @see JXG.Board#defaultAxes
2775              * @type Number
2776              * @default 1
2777              */
2778             snapSizeY: 1,
2779 
2780             /**
2781              * List of attractor elements. If the distance of the image is less than
2782              * attractorDistance the image is made to glider of this element.
2783              *
2784              * @name Image#attractors
2785              *
2786              * @type Array
2787              * @default empty
2788              */
2789             attractors: []
2790 
2791             /**#@-*/
2792         },
2793 
2794         /* special options for incircle of 3 points */
2795         incircle: {
2796             /**#@+
2797              * @visprop
2798              */
2799 
2800             fillColor: 'none',
2801             highlightFillColor: 'none',
2802             strokeColor: '#0000ff',
2803             highlightStrokeColor: '#C3D9FF',
2804 
2805             /**
2806              * Attributes of circle center.
2807              *
2808              * @type Point
2809              * @name Incircle#center
2810              */
2811             center: {               // center point
2812                 visible: false,
2813                 fixed: false,
2814                 withLabel: false,
2815                 name: ''
2816             }
2817             /**#@-*/
2818         },
2819 
2820         inequality: {
2821             /**#@+
2822              * @visprop
2823              */
2824 
2825             fillColor: 'red',
2826             fillOpacity: 0.2,
2827             strokeColor: 'none',
2828 
2829             /**
2830              * By default an inequality is less (or equal) than. Set inverse to <tt>true</tt> will consider the inequality
2831              * greater (or equal) than.
2832              *
2833              * @type Boolean
2834              * @default false
2835              * @name Inequality#inverse
2836              * @visprop
2837              */
2838             inverse: false
2839             /**#@-*/
2840         },
2841 
2842         infobox: {
2843             /**#@+
2844              * @visprop
2845              */
2846 
2847             fontSize: 12,
2848             isLabel: false,
2849             strokeColor: '#bbbbbb',
2850             display: 'html',             // 'html' or 'internal'
2851             anchorX: 'left',             //  'left', 'middle', or 'right': horizontal alignment
2852                                          //  of the text.
2853             anchorY: 'middle',           //  'top', 'middle', or 'bottom': vertical alignment
2854                                          //  of the text.
2855             cssClass: 'JXGinfobox',
2856             rotate: 0,                   // works for non-zero values only in combination
2857                                          // with display=='internal'
2858             visible: true,
2859             parse: false,
2860             transitionDuration: 0,
2861             needsRegularUpdate: false
2862 
2863             /**#@-*/
2864         },
2865 
2866         /* special options for integral */
2867         integral: {
2868             /**#@+
2869              * @visprop
2870              */
2871 
2872             axis: 'x',        // 'x' or 'y'
2873             withLabel: true,    // Show integral value as text
2874             fixed: true,
2875             strokeWidth: 0,
2876             strokeOpacity: 0,
2877             fillColor: 'red',
2878             fillOpacity: 0.4,
2879             highlightFillColor: 'red',
2880             highlightFillOpacity: 0.2,
2881 
2882             /**
2883              * Attributes of the (left) starting point of the integral.
2884              *
2885              * @type Point
2886              * @name Integral#curveLeft
2887              * @see Integral#baseLeft
2888              */
2889             curveLeft: {    // Start point
2890                 visible: true,
2891                 withLabel: false,
2892                 color: 'red',
2893                 fillOpacity: 0.8,
2894                 layer: 9
2895             },
2896 
2897             /**
2898              * Attributes of the (left) base point of the integral.
2899              *
2900              * @type Point
2901              * @name Integral#baseLeft
2902              * @see Integral#curveLeft
2903              */
2904             baseLeft: {    // Start point
2905                 visible: false,
2906                 fixed: false,
2907                 withLabel: false,
2908                 name: ''
2909             },
2910 
2911             /**
2912              * Attributes of the (right) end point of the integral.
2913              *
2914              * @type Point
2915              * @name Integral#curveRight
2916              * @see Integral#baseRight
2917              */
2918             curveRight: {      // End point
2919                 visible: true,
2920                 withLabel: false,
2921                 color: 'red',
2922                 fillOpacity: 0.8,
2923                 layer: 9
2924             },
2925 
2926             /**
2927              * Attributes of the (right) base point of the integral.
2928              *
2929              * @type Point
2930              * @name Integral#baseRight
2931              * @see Integral#curveRight
2932              */
2933             baseRight: {      // End point
2934                 visible: false,
2935                 fixed: false,
2936                 withLabel: false,
2937                 name: ''
2938             },
2939 
2940             /**
2941              * Attributes for integral label.
2942              *
2943              * @type Label
2944              * @name Integral#label
2945              */
2946             label: {
2947                 fontSize: 20
2948             }
2949             /**#@-*/
2950         },
2951 
2952         /* special input options */
2953         input: {
2954             /**#@+
2955              * @visprop
2956              */
2957 
2958             /**
2959              * Control the attribute "disabled" of the HTML input field.
2960              *
2961              * @name disabled
2962              * @memberOf Input.prototype
2963              *
2964              * @type Boolean
2965              * @default false
2966              */
2967             disabled: false,
2968 
2969             /**
2970              * Control the attribute "maxlength" of the HTML input field.
2971              *
2972              * @name maxlength
2973              * @memberOf Input.prototype
2974              *
2975              * @type Number
2976              * @default 524288 (as in HTML)
2977              */
2978             maxlength: 524288,
2979 
2980             display: 'html'
2981 
2982             /**#@-*/
2983         },
2984 
2985         /* special intersection point options */
2986         intersection: {
2987             /**#@+
2988              * @visprop
2989              */
2990 
2991             /**
2992              * Used in {@link JXG.Intersection}.
2993              * This flag sets the behaviour of intersection points of e.g.
2994              * two segments. If true, the intersection is treated as intersection of lines. If false
2995              * the intersection point exists if the segments intersect setwise.
2996              *
2997              * @name Intersection.alwaysIntersect
2998              * @type Boolean
2999              * @default true
3000              */
3001             alwaysIntersect: true
3002 
3003             /**#@-*/
3004         },
3005 
3006         /* special label options */
3007         label: {
3008             /**#@+
3009              * @visprop
3010              */
3011 
3012             visible: 'inherit',
3013             strokeColor: 'black',
3014             strokeOpacity: 1,
3015             highlightStrokeOpacity: 0.666666,
3016             highlightStrokeColor: 'black',
3017 
3018             fixed: true,
3019 
3020             /**
3021              * Possible string values for the position of a label for
3022              * label anchor points are:
3023              * <ul>
3024              * <li> 'lft'
3025              * <li> 'rt'
3026              * <li> 'top'
3027              * <li> 'bot'
3028              * <li> 'ulft'
3029              * <li> 'urt'
3030              * <li> 'llft'
3031              * <li> 'lrt'
3032              * </ul>
3033              * This is relevant for non-points: line, circle, curve.
3034              *
3035              * The names have been borrowed from <a href="https://www.tug.org/metapost.html">MetaPost</a>.
3036              *
3037              * @name Label#position
3038              * @see Label#offset
3039              * @type String
3040              * @default 'urt'
3041              */
3042             position: 'urt',
3043 
3044             /**
3045              *  Label offset from label anchor.
3046              *  The label anchor is determined by {@link Label#position}
3047              *
3048              * @name Label#offset
3049              * @see Label#position
3050              * @type Array
3051              * @default [10,10]
3052              */
3053             offset: [10, 10],
3054 
3055             /**
3056              * Automatic position of label text. When called first, the positioning algorithm
3057              * starts at the position defined by offset.
3058              * The algorithm tries to find a position with the least number of
3059              * overlappings with other elements, while retaining the distance
3060              * to the anchor element.
3061              *
3062              * @name Label#autoPosition
3063              * @see Label#offset
3064              * @type {Boolean}
3065              * @default false
3066              *
3067              * @example
3068              * 	var p1 = board.create('point', [-2, 1], {id: 'A'});
3069              * 	var p2 = board.create('point', [-0.85, 1], {
3070              *      name: 'B', id: 'B', label:{autoPosition: true, offset:[10, 10]}
3071              *  });
3072              * 	var p3 = board.create('point', [-1, 1.2], {
3073              *      name: 'C', id: 'C', label:{autoPosition: true, offset:[10, 10]}
3074              *  });
3075              *  var c = board.create('circle', [p1, p2]);
3076              * 	var l = board.create('line', [p1, p2]);
3077              *
3078              * </pre><div id="JXG7d4dafe7-1a07-4d3f-95cb-bfed9d96dea2" class="jxgbox" style="width: 300px; height: 300px;"></div>
3079              * <script type="text/javascript">
3080              *     (function() {
3081              *         var board = JXG.JSXGraph.initBoard('JXG7d4dafe7-1a07-4d3f-95cb-bfed9d96dea2',
3082              *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
3083              *     	var p1 = board.create('point', [-2, 1], {id: 'A'});
3084              *     	var p2 = board.create('point', [-0.85, 1], {name: 'B', id: 'B', label:{autoPosition: true, offset:[10, 10]}});
3085              *     	var p3 = board.create('point', [-1, 1.2], {name: 'C', id: 'C', label:{autoPosition: true, offset:[10, 10]}});
3086              *      var c = board.create('circle', [p1, p2]);
3087              *     	var l = board.create('line', [p1, p2]);
3088              *
3089              *     })();
3090              *
3091              * </script><pre>
3092              *
3093              *
3094              */
3095             autoPosition: false
3096 
3097             /**#@-*/
3098         },
3099 
3100         /* special legend options */
3101         legend: {
3102             /**
3103              * @visprop
3104              */
3105 
3106              /**
3107               * Default style of a legend element. The only possible value is 'vertical'.
3108               * @name: Legend#style
3109               * @type String
3110               * @default 'vertical'
3111               */
3112             style: 'vertical',
3113 
3114             /**
3115              * Label names of a legend element.
3116              * @name: Legend#labels
3117              * @type Array
3118              * @default "['1', '2', '3', '4', '5', '6', '7', '8']"
3119              */
3120             labels: ['1', '2', '3', '4', '5', '6', '7', '8'],
3121 
3122             /**
3123              * (Circular) array of label colors.
3124              * @name: Legend#colors
3125              * @type Array
3126              * @default "['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00']"
3127              */
3128             colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
3129 
3130             /**
3131              * Height (in px) of one legend entry
3132              * @name: Legend#rowHeight
3133              * @type Number
3134              * @default 20
3135              *
3136              */
3137             rowHeight: 20,
3138 
3139             strokeWidth: 5
3140 
3141             /**#@-*/
3142         },
3143 
3144         /* special line options */
3145         line: {
3146             /**#@+
3147              * @visprop
3148              */
3149 
3150             /**
3151              * Line has an arrow head at the position of its first point or the corresponding
3152              * intersection with the canvas border
3153              *
3154              * In case firstArrow is an object it has the sub-attributes:
3155              * <pre>
3156              * {
3157              *      type: 1, // possible values are 1, 2, ..., 6. Default value is 1.
3158              *      size: 6, // size of the arrow head. Default value is 6.
3159              *               // This value is multiplied with the strokeWidth of the line
3160              *      highlightSize: 6, // size of the arrow head in case the element is highlighted. Default value
3161              * }
3162              * </pre>
3163              *
3164              * @name Line#firstArrow
3165              * @see Line#lastArrow
3166              * @see Line#touchFirstPoint
3167              * @type Boolean / Object
3168              * @default false
3169              */
3170             firstArrow: false,
3171 
3172             /**
3173              * Line has an arrow head at the position of its second point or the corresponding
3174              * intersection with the canvas border.
3175              *
3176              * In case firstArrow is an object it has the sub-attributes:
3177              * <pre>
3178              * {
3179              *      type: 1, // possible values are 1, 2, ..., 6. Default value is 1.
3180              *      size: 6, // size of the arrow head. Default value is 6.
3181              *               // This value is multiplied with the strokeWidth of the line.
3182              *      highlightSize: 6, // size of the arrow head in case the element is highlighted. Default value is 6.
3183              * }
3184              * </pre>
3185              *
3186              * @example
3187              *     var p1 = board.create('point', [-5, 2], {size:1});
3188              *     var p2 = board.create('point', [5, 2], {size:10});
3189              *     var li = board.create('segment', ['A','B'],
3190              *         {name:'seg',
3191              *          strokeColor:'#000000',
3192              *          strokeWidth:1,
3193              *          highlightStrokeWidth: 5,
3194              *          lastArrow: {type: 2, size: 8, highlightSize: 6},
3195              *          touchLastPoint: true,
3196              *          firstArrow: {type: 3, size: 8}
3197              *         });
3198              *
3199              * </pre><div id="JXG184e915c-c2ef-11e8-bece-04d3b0c2aad3" class="jxgbox" style="width: 300px; height: 300px;"></div>
3200              * <script type="text/javascript">
3201              *     (function() {
3202              *         var board = JXG.JSXGraph.initBoard('JXG184e915c-c2ef-11e8-bece-04d3b0c2aad3',
3203              *             {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
3204              *         var p1 = board.create('point', [-5, 2], {size:1});
3205              *         var p2 = board.create('point', [5, 2], {size:10});
3206              *         var li = board.create('segment', ['A','B'],
3207              *             {name:'seg',
3208              *              strokeColor:'#000000',
3209              *              strokeWidth:1,
3210              *              highlightStrokeWidth: 5,
3211              *              lastArrow: {type: 2, size: 8, highlightSize: 6},
3212              *              touchLastPoint: true,
3213              *              firstArrow: {type: 3, size: 8}
3214              *             });
3215              *
3216              *     })();
3217              *
3218              * </script>
3219              *
3220              * @name Line#lastArrow
3221              * @see Line#firstArrow
3222              * @see Line#touchLastPoint
3223              * @type Boolean / Object
3224              * @default false
3225              */
3226             lastArrow: false,
3227 
3228 
3229             /**
3230              * This number (pixel value) controls where infinite lines end at the canvas border. If zero, the line
3231              * ends exactly at the border, if negative there is a margin to the inside, if positive the line
3232              * ends outside of the canvas (which is invisible).
3233              *
3234              * @name: Line#margin
3235              * @type Number
3236              * @default 0
3237              */
3238             margin: 0,
3239 
3240             /**
3241              * If true, line stretches infinitely in direction of its first point.
3242              * Otherwise it ends at point1.
3243              *
3244              * @name Line#straightFirst
3245              * @see Line#straightLast
3246              * @type Boolean
3247              * @default true
3248              */
3249             straightFirst: true,
3250 
3251             /**
3252              * If true, line stretches infinitely in direction of its second point.
3253              * Otherwise it ends at point2.
3254              *
3255              * @name Line#straightLast
3256              * @see Line#straightFirst
3257              * @type Boolean
3258              * @default true
3259              */
3260             straightLast: true,
3261 
3262             fillColor: 'none',               // Important for VML on IE
3263             highlightFillColor: 'none',  // Important for VML on IE
3264             strokeColor: '#0000ff',
3265             highlightStrokeColor: '#888888',
3266             withTicks: false,
3267 
3268             /**
3269              * Attributes for first defining point of the line.
3270              *
3271              * @type Point
3272              * @name Line#point1
3273              */
3274             point1: {                  // Default values for point1 if created by line
3275                 visible: false,
3276                 withLabel: false,
3277                 fixed: false,
3278                 name: ''
3279             },
3280 
3281             /**
3282              * Attributes for second defining point of the line.
3283              *
3284              * @type Point
3285              * @name Line#point2
3286              */
3287             point2: {                  // Default values for point2 if created by line
3288                 visible: false,
3289                 withLabel: false,
3290                 fixed: false,
3291                 name: ''
3292             },
3293 
3294             /**
3295              * Attributes for ticks of the line.
3296              *
3297              * @type Ticks
3298              * @name Line#ticks
3299              */
3300             ticks: {
3301                 drawLabels: true,
3302                 label: {
3303                     offset: [4, -12 + 3] // This seems to be a good offset for 12 point fonts
3304                 },
3305                 drawZero: false,
3306                 insertTicks: false,
3307                 minTicksDistance: 50,
3308                 minorHeight: 4,          // if <0: full width and height
3309                 majorHeight: -1,         // if <0: full width and height
3310                 minorTicks: 4,
3311                 defaultDistance: 1,
3312                 strokeOpacity: 0.3,
3313                 visible: 'inherit'
3314             },
3315 
3316             /**
3317              * Attributes for the line label.
3318              *
3319              * @type Label
3320              * @name Line#label
3321              */
3322             label: {
3323                 position: 'llft'
3324             },
3325 
3326             /**
3327              * If set to true, the point will snap to a grid defined by
3328              * {@link Point#snapSizeX} and {@link Point#snapSizeY}.
3329              *
3330              * @see Point#snapSizeX
3331              * @see Point#snapSizeY
3332              * @type Boolean
3333              * @name Line#snapToGrid
3334              * @default false
3335              */
3336             snapToGrid: false,
3337 
3338             /**
3339              * Defines together with {@link Point#snapSizeY} the grid the point snaps on to.
3340              * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3341              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3342              * of the default ticks of the default x axes of the board.
3343              *
3344              * @see Point#snapToGrid
3345              * @see Point#snapSizeY
3346              * @see JXG.Board#defaultAxes
3347              * @type Number
3348              * @name Line#snapSizeX
3349              * @default 1
3350              */
3351             snapSizeX: 1,
3352 
3353             /**
3354              * Defines together with {@link Point#snapSizeX} the grid the point snaps on to.
3355              * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3356              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3357              * of the default ticks of the default y axes of the board.
3358              *
3359              * @see Point#snapToGrid
3360              * @see Point#snapSizeX
3361              * @see JXG.Board#defaultAxes
3362              * @type Number
3363              * @name Line#snapSizeY
3364              * @default 1
3365              */
3366             snapSizeY: 1,
3367 
3368             /**
3369              * If set to true and {@link Line#firstArrow} is set to true, the arrow head will just touch
3370              * the circle line of the start point of the line.
3371              *
3372              * @see Line#firstArrow
3373              * @type Boolean
3374              * @name Line#touchFirstPoint
3375              * @default false
3376              */
3377             touchFirstPoint: false,
3378 
3379             /**
3380              * If set to true and {@link Line#lastArrow} is set to true, the arrow head will just touch
3381              * the circle line of the start point of the line.
3382              * @see Line#firstArrow
3383              * @type Boolean
3384              * @name Line#touchLastPoint
3385              * @default false
3386              */
3387             touchLastPoint: false,
3388 
3389             /**
3390              * Line endings (linecap) of a straight line.
3391              * Possible values are:
3392              * <ul>
3393              * <li> 'butt',
3394              * <li> 'round',
3395              * <li> 'square'.
3396              * </ul>
3397              * Not available for VML renderer.
3398              * [lineCap description]
3399              * @name Line#lineCap
3400              * @type {String}
3401              * @default 'butt'
3402              */
3403             lineCap: 'butt'
3404 
3405 
3406             /**#@-*/
3407         },
3408 
3409         /* special options for locus curves */
3410         locus: {
3411             /**#@+
3412              * @visprop
3413              */
3414 
3415             translateToOrigin: false,
3416             translateTo10: false,
3417             stretch: false,
3418             toOrigin: null,
3419             to10: null
3420             /**#@-*/
3421         },
3422 
3423         /* special cardinal spline options */
3424         metapostspline: {
3425             /**#@+
3426              * @visprop
3427              */
3428 
3429              /**
3430               * Controls if the data points of the cardinal spline when given as
3431               * arrays should be converted into {@link JXG.Points}.
3432               *
3433               * @name createPoints
3434               * @memberOf Metapostspline.prototype
3435               *
3436               * @see Metapostspline#points
3437               *
3438               * @type Boolean
3439               * @default true
3440               */
3441             createPoints: true,
3442 
3443             /**
3444              * If set to true, the supplied coordinates are interpreted as
3445              * [[x_0, y_0], [x_1, y_1], p, ...].
3446              * Otherwise, if the data consists of two arrays of equal length,
3447              * it is interpreted as
3448              * [[x_o x_1, ..., x_n], [y_0, y_1, ..., y_n]]
3449              *
3450              * @name isArrayOfCoordinates
3451              * @memberOf Metapostspline.prototype
3452              * @type {Boolean}
3453              * @default false
3454              */
3455             isArrayOfCoordinates: false,
3456 
3457             /**
3458              * Attributes for the points generated by Metapostspline in cases
3459              * {@link createPoints} is set to true
3460              *
3461              * @name points
3462              * @memberOf Metapostspline.prototype
3463              *
3464              * @see Metapostspline#createPoints
3465              * @type Object
3466              */
3467             points: {
3468                 strokeOpacity: 0.05,
3469                 fillOpacity: 0.05,
3470                 highlightStrokeOpacity: 1.0,
3471                 highlightFillOpacity: 1.0,
3472                 withLabel: false,
3473                 name: '',
3474                 fixed: false
3475             }
3476 
3477             /**#@-*/
3478         },
3479 
3480         /* special mirrorelement options */
3481         mirrorelement: {
3482             /**#@+
3483              * @visprop
3484              */
3485 
3486             fixed: true,
3487 
3488             /**
3489              * Attributes of mirror point, i.e. the point along which the element is mirrored.
3490              *
3491              * @type Point
3492              * @name mirrorelement#point
3493              */
3494             point: {},
3495 
3496             /**
3497              * Attributes of circle center, i.e. the center of the circle,
3498              * if a circle is the mirror element and the transformation type is 'Euclidean'
3499              *
3500              * @type Point
3501              * @name mirrorelement#center
3502              */
3503             center: {},
3504 
3505             /**
3506              * Type of transformation. Possible values are 'Euclidean', 'projective'.
3507              *
3508              * If the value is 'Euclidean', the mirror element of a circle is again a circle,
3509              * otherwise it is a conic section.
3510              *
3511              * @type String
3512              * @name mirrorelement#type
3513              * @default 'Euclidean'
3514              */
3515             type: 'Euclidean'
3516 
3517             /**#@-*/
3518         },
3519 
3520         // /* special options for Msector of 3 points */
3521         // msector: {
3522         //     strokeColor: '#000000', // Msector line
3523         //     point: {               // Msector point
3524         //         visible: false,
3525         //         fixed: false,
3526         //         withLabel: false,
3527         //         name: ''
3528         //     }
3529         // },
3530 
3531         /* special options for normal lines */
3532         normal: {
3533             /**#@+
3534              * @visprop
3535              */
3536 
3537             strokeColor: '#000000', //  normal line
3538 
3539             /**
3540              * Attributes of helper point of normal.
3541              *
3542              * @type Point
3543              * @name Normal#point
3544              */
3545             point: {
3546                 visible: false,
3547                 fixed: false,
3548                 withLabel: false,
3549                 name: ''
3550             }
3551             /**#@-*/
3552         },
3553 
3554         /* special options for orthogonal projection points */
3555         orthogonalprojection: {
3556             /**#@+
3557              * @visprop
3558              */
3559 
3560 
3561             /**#@-*/
3562         },
3563 
3564         /* special options for parallel lines */
3565         parallel: {
3566             /**#@+
3567              * @visprop
3568              */
3569 
3570             strokeColor: '#000000', // Parallel line
3571 
3572             /**
3573              * Attributes of helper point of normal.
3574              *
3575              * @type Point
3576              * @name Parallel#point
3577              */
3578             point: {
3579                 visible: false,
3580                 fixed: false,
3581                 withLabel: false,
3582                 name: ''
3583             },
3584 
3585             label: {
3586                 position: 'llft'
3587             }
3588             /**#@-*/
3589         },
3590 
3591         /* special perpendicular options */
3592         perpendicular: {
3593             /**#@+
3594              * @visprop
3595              */
3596 
3597             strokeColor: '#000000', // Perpendicular line
3598             straightFirst: true,
3599             straightLast: true
3600             /**#@-*/
3601         },
3602 
3603         /* special perpendicular options */
3604         perpendicularsegment: {
3605             /**#@+
3606              * @visprop
3607              */
3608 
3609             strokeColor: '#000000', // Perpendicular segment
3610             straightFirst: false,
3611             straightLast: false,
3612             point: {               // Perpendicular point
3613                 visible: false,
3614                 fixed: true,
3615                 withLabel: false,
3616                 name: ''
3617             }
3618             /**#@-*/
3619         },
3620 
3621         /* special point options */
3622         point: {
3623             /**#@+
3624              * @visprop
3625              */
3626 
3627             withLabel: true,
3628             label: {},
3629 
3630             /**
3631              * This attribute was used to determined the point layout. It was derived from GEONExT and was
3632              * replaced by {@link Point#face} and {@link Point#size}.
3633              *
3634              * @name Point#style
3635              *
3636              * @see Point#face
3637              * @see Point#size
3638              * @type Number
3639              * @default 5
3640              * @deprecated
3641              */
3642             style: 5,
3643 
3644             /**
3645              * There are different point styles which differ in appearance.
3646              * Posssible values are
3647              * <table><tr><th>Value</th></tr>
3648              * <tr><td>cross</td></tr>
3649              * <tr><td>circle</td></tr>
3650              * <tr><td>square</td></tr>
3651              * <tr><td>plus</td></tr>
3652              * <tr><td>diamond</td></tr>
3653              * <tr><td>triangleUp</td></tr>
3654              * <tr><td>triangleDown</td></tr>
3655              * <tr><td>triangleLeft</td></tr>
3656              * <tr><td>triangleRight</td></tr>
3657              * </table>
3658              *
3659              * @name Point#face
3660              *
3661              * @type String
3662              * @see JXG.Point#setStyle
3663              * @default circle
3664              */
3665             face: 'o',
3666 
3667             /**
3668              * Size of a point, either in pixel or user coordinates.
3669              * Means radius resp. half the width of a point (depending on the face).
3670              *
3671              * @name Point#size
3672              *
3673              * @see Point#face
3674              * @see JXG.Point#setStyle
3675              * @see Point#sizeUnit
3676              * @type Number
3677              * @default 3
3678              */
3679             size: 3,
3680 
3681             /**
3682              * Unit for size.
3683              * Possible values are 'screen' and 'user.
3684              *
3685              * @name Point#sizeUnit
3686              *
3687              * @see Point#size
3688              * @type String
3689              * @default 'screen'
3690              */
3691             sizeUnit: 'screen',
3692 
3693             fillColor: '#ff0000',
3694             highlightFillColor: '#EEEEEE',
3695             strokeWidth: 2,
3696             strokeColor: '#ff0000',
3697             highlightStrokeColor: '#C3D9FF',
3698 
3699             /**
3700              * If true, the point size changes on zoom events.
3701              *
3702              * @type Boolean
3703              * @name Point#zoom
3704              * @default false
3705              *
3706              */
3707             zoom: false,             // Change the point size on zoom
3708 
3709             /**
3710              * If true, the infobox is shown on mouse/pen over, if false not.
3711              * If the value is 'inherit', the value of
3712              * {@link JXG.Board#showInfobox} is taken.
3713              *
3714              * @name Point#showInfobox
3715              * @see JXG.Board#showInfobox
3716              * @type {Boolean|String} true | false | 'inherit'
3717              * @default true
3718              */
3719             showInfobox: 'inherit',
3720 
3721             /**
3722              * Truncating rule for the digits in the infobox.
3723              * <ul>
3724              * <li>'auto': done automatically by JXG.autoDigits()
3725              * <li>'none': no truncation
3726              * <li>number: truncate after "number digits" with JXG.toFixed()
3727              * </ul>
3728              *
3729              * @name Point#infoboxDigits
3730              *
3731              * @type String, Number
3732              * @default 'auto'
3733              * @see JXG#autoDigits
3734              * @see JXG#toFixed
3735              */
3736             infoboxDigits: 'auto',
3737 
3738             draft: false,
3739 
3740             /**
3741              * List of attractor elements. If the distance of the point is less than
3742              * attractorDistance the point is made to glider of this element.
3743              *
3744              * @name Point#attractors
3745              *
3746              * @type Array
3747              * @default empty
3748              */
3749             attractors: [],
3750 
3751             /**
3752              * Unit for attractorDistance and snatchDistance, used for magnetized points and for snapToPoints.
3753              * Possible values are 'screen' and 'user'.
3754              *
3755              * @name Point#attractorUnit
3756              *
3757              * @see Point#attractorDistance
3758              * @see Point#snatchDistance
3759              * @see Point#snapToPoints
3760              * @see Point#attractors
3761              * @type String
3762              * @default 'user'
3763              */
3764             attractorUnit: 'user',    // 'screen', 'user'
3765 
3766             /**
3767              * If the distance of the point to one of its attractors is less
3768              * than this number the point will be a glider on this
3769              * attracting element.
3770              * If set to zero nothing happens.
3771              *
3772              * @name Point#attractorDistance
3773              *
3774              * @type Number
3775              * @default 0.0
3776              */
3777             attractorDistance: 0.0,
3778 
3779             /**
3780              * If the distance of the point to one of its attractors is at least
3781              * this number the point will be released from being a glider on the
3782              * attracting element.
3783              * If set to zero nothing happens.
3784              *
3785              * @name Point#snatchDistance
3786              *
3787              * @type Number
3788              * @default 0.0
3789              */
3790             snatchDistance: 0.0,
3791 
3792             /**
3793              * If set to true, the point will snap to a grid defined by
3794              * {@link Point#snapSizeX} and {@link Point#snapSizeY}.
3795              *
3796              * @name Point#snapToGrid
3797              *
3798              * @see Point#snapSizeX
3799              * @see Point#snapSizeY
3800              * @type Boolean
3801              * @default false
3802              */
3803             snapToGrid: false,
3804 
3805             /**
3806              * Defines together with {@link Point#snapSizeY} the grid the point snaps on to.
3807              * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3808              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3809              * of the default ticks of the default x axes of the board.
3810              *
3811              * @name Point#snapSizeX
3812              *
3813              * @see Point#snapToGrid
3814              * @see Point#snapSizeY
3815              * @see JXG.Board#defaultAxes
3816              * @type Number
3817              * @default 1
3818              */
3819             snapSizeX: 1,
3820 
3821             /**
3822              * Defines together with {@link Point#snapSizeX} the grid the point snaps on to.
3823              * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3824              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3825              * of the default ticks of the default y axes of the board.
3826              *
3827              * @name Point#snapSizeY
3828              *
3829              * @see Point#snapToGrid
3830              * @see Point#snapSizeX
3831              * @see JXG.Board#defaultAxes
3832              * @type Number
3833              * @default 1
3834              */
3835             snapSizeY: 1,
3836 
3837             /**
3838              * If set to true, the point will snap to the nearest point in distance of
3839              * {@link Point#attractorDistance}.
3840              *
3841              * @name Point#snapToPoints
3842              *
3843              * @see Point#attractorDistance
3844              * @type Boolean
3845              * @default false
3846              */
3847             snapToPoints: false,
3848 
3849             /**
3850              * List of elements which are ignored by snapToPoints.
3851              * @name Point#ignoredSnapToPoints
3852              *
3853              * @type Array
3854              * @default empty
3855              */
3856             ignoredSnapToPoints: []
3857 
3858             /**#@-*/
3859         },
3860 
3861         /* special polygon options */
3862         polygon: {
3863             /**#@+
3864              * @visprop
3865              */
3866 
3867             /**
3868              * If <tt>true</tt>, moving the mouse over inner points triggers hasPoint.
3869              *
3870              * @see JXG.GeometryElement#hasPoint
3871              * @name Polygon#hasInnerPoints
3872              * @type Boolean
3873              * @default false
3874              */
3875             hasInnerPoints: false,
3876 
3877             fillColor: '#00FF00',
3878             highlightFillColor: '#00FF00',
3879             fillOpacity: 0.3,
3880             highlightFillOpacity: 0.3,
3881 
3882             /**
3883              * Is the polygon bordered by lines?
3884              *
3885              * @type Boolean
3886              * @name Polygon#withLines
3887              * @default true
3888              */
3889             withLines: true,
3890 
3891             /**
3892              * Attributes for the polygon border lines.
3893              *
3894              * @type Line
3895              * @name Polygon#borders
3896              */
3897             borders: {
3898                 withLabel: false,
3899                 strokeWidth: 1,
3900                 highlightStrokeWidth: 1,
3901                 // Polygon layer + 1
3902                 layer: 5,
3903                 label: {
3904                     position: 'top'
3905                 },
3906                 visible: 'inherit'
3907             },
3908 
3909             /**
3910              * Attributes for the polygon vertices.
3911              *
3912              * @type Point
3913              * @name Polygon#vertices
3914              */
3915             vertices: {
3916                 layer: 9,
3917                 withLabel: false,
3918                 name: '',
3919                 strokeColor: '#ff0000',
3920                 fillColor: '#ff0000',
3921                 fixed: false,
3922                 visible: 'inherit'
3923             },
3924 
3925             /**
3926              * Attributes for the polygon label.
3927              *
3928              * @type Label
3929              * @name Polygon#label
3930              */
3931             label: {
3932                 offset: [0, 0]
3933             }
3934 
3935             /**#@-*/
3936         },
3937 
3938         /* special polygonal chain options
3939         */
3940         polygonalchain: {
3941             /**#@+
3942              * @visprop
3943              */
3944 
3945             fillColor: 'none',
3946             highlightFillColor: 'none'
3947 
3948             /**#@-*/
3949         },
3950 
3951         /* special prescribed angle options
3952         * Not yet implemented. But angle.setAngle(val) is implemented.
3953         */
3954         prescribedangle: {
3955             /**#@+
3956              * @visprop
3957              */
3958 
3959             /**
3960              * Attributes for the helper point of the prescribed angle.
3961              *
3962              * @type Point
3963              * @name PrescribedAngle#anglePoint
3964              */
3965             anglePoint: {
3966                 size: 2,
3967                 visible: false,
3968                 withLabel: false
3969             }
3970 
3971             /**#@-*/
3972         },
3973 
3974         /* special reflection options */
3975         reflection: {
3976             /**#@+
3977              * @visprop
3978              */
3979 
3980             fixed: true,
3981 
3982             /**
3983              * Attributes of circle center, i.e. the center of the circle,
3984              * if a circle is the mirror element and the transformation type is 'Euclidean'
3985              *
3986              * @type Point
3987              * @name mirrorelement#center
3988              */
3989             center: {},
3990 
3991             /**
3992              * Type of transformation. Possible values are 'Euclidean', 'projective'.
3993              *
3994              * If the value is 'Euclidean', the reflected element of a circle is again a circle,
3995              * otherwise it is a conic section.
3996              *
3997              * @type String
3998              * @name reflection#type
3999              * @default 'Euclidean'
4000              */
4001             type: 'Euclidean'
4002 
4003             /**#@-*/
4004         },
4005 
4006         /* special regular polygon options */
4007         regularpolygon: {
4008             /**#@+
4009              * @visprop
4010              */
4011 
4012             /**
4013              * If <tt>true</tt>, moving the mouse over inner points triggers hasPoint.
4014              * @see JXG.GeometryElement#hasPoint
4015              *
4016              * @name RegularPolygon#hasInnerPoints
4017              * @type Boolean
4018              * @default false
4019              */
4020             hasInnerPoints: false,
4021             fillColor: '#00FF00',
4022             highlightFillColor: '#00FF00',
4023             fillOpacity: 0.3,
4024             highlightFillOpacity: 0.3,
4025 
4026             /**
4027              * Is the polygon bordered by lines?
4028              *
4029              * @type Boolean
4030              * @name RegularPolygon#withLines
4031              * @default true
4032              */
4033             withLines: true,
4034 
4035             /**
4036              * Attributes for the polygon border lines.
4037              *
4038              * @type Line
4039              * @name RegularPolygon#borders
4040              */
4041             borders: {
4042                 withLabel: false,
4043                 strokeWidth: 1,
4044                 highlightStrokeWidth: 1,
4045                 // Polygon layer + 1
4046                 layer: 5,
4047                 label: {
4048                     position: 'top'
4049                 }
4050             },
4051 
4052             /**
4053              * Attributes for the polygon vertices.
4054              *
4055              * @type Point
4056              * @name RegularPolygon#vertices
4057              */
4058             vertices: {
4059                 layer: 9,
4060                 withLabel: true,
4061                 strokeColor: '#ff0000',
4062                 fillColor: '#ff0000',
4063                 fixed: false
4064             },
4065 
4066             /**
4067              * Attributes for the polygon label.
4068              *
4069              * @type Label
4070              * @name Polygon#label
4071              */
4072             label: {
4073                 offset: [0, 0]
4074             }
4075 
4076             /**#@-*/
4077         },
4078 
4079         /* special options for riemann sums */
4080         riemannsum: {
4081             /**#@+
4082              * @visprop
4083              */
4084 
4085             withLabel: false,
4086             fillOpacity: 0.3,
4087             fillColor: '#ffff00'
4088 
4089             /**#@-*/
4090         },
4091 
4092         /* special sector options */
4093         sector: {
4094             /**#@+
4095              * @visprop
4096              */
4097 
4098             fillColor: '#00FF00',
4099             highlightFillColor: '#00FF00',
4100             fillOpacity: 0.3,
4101             highlightFillOpacity: 0.3,
4102             highlightOnSector: false,
4103             highlightStrokeWidth: 0,
4104 
4105             /**
4106              * Type of sector. Possible values are 'minor', 'major', and 'auto'.
4107              *
4108              * @type String
4109              * @name Sector#selection
4110              * @default 'auto'
4111              */
4112             selection: 'auto',
4113 
4114             /**
4115              * Attributes for sub-element arc. It is only available, if the sector is defined by three points.
4116              *
4117              * @type Arc
4118              * @name Sector#arc
4119              * @default '{visible:false}'
4120              */
4121             arc: {
4122                 visible: false,
4123                 fillColor: 'none'
4124             },
4125 
4126             /**
4127              * Attributes for helper point radiuspoint in case it is provided by coordinates.
4128              *
4129              * @type Point
4130              * @name Sector#radiusPoint
4131              */
4132             radiusPoint: {
4133                 visible: false,
4134                 withLabel: false
4135             },
4136 
4137             /**
4138              * Attributes for helper point center in case it is provided by coordinates.
4139              *
4140              * @type Point
4141              * @name Sector#center
4142              */
4143             center: {
4144                 visible: false,
4145                 withLabel: false
4146             },
4147 
4148             /**
4149              * Attributes for helper point anglepoint in case it is provided by coordinates.
4150              *
4151              * @type Point
4152              * @name Sector#anglePoint
4153              */
4154             anglePoint: {
4155                 visible: false,
4156                 withLabel: false
4157             },
4158 
4159             /**
4160              * Attributes for the sector label.
4161              *
4162              * @type Label
4163              * @name Sector#label
4164              */
4165             label: {
4166                 offset: [0, 0],
4167                 anchorX: 'auto',
4168                 anchorY: 'auto'
4169             }
4170 
4171             /**#@-*/
4172         },
4173 
4174         /* special segment options */
4175         segment: {
4176             /**#@+
4177              * @visprop
4178              */
4179 
4180             label: {
4181                 position: 'top'
4182             }
4183             /**#@-*/
4184         },
4185 
4186         semicircle: {
4187             /**#@+
4188              * @visprop
4189              */
4190 
4191             /**
4192              * Attributes for center point of the semicircle.
4193              *
4194              * @type Point
4195              * @name Semicircle#center
4196              */
4197             center: {
4198                 visible: false,
4199                 withLabel: false,
4200                 fixed: false,
4201                 name: ''
4202             }
4203 
4204             /**#@-*/
4205         },
4206 
4207         /* special slider options */
4208         slider: {
4209             /**#@+
4210              * @visprop
4211              */
4212 
4213             /**
4214              * The slider only returns integer multiples of this value, e.g. for discrete values set this property to <tt>1</tt>. For
4215              * continuous results set this to <tt>-1</tt>.
4216              *
4217              * @memberOf Slider.prototype
4218              * @name snapWidth
4219              * @type Number
4220              */
4221             snapWidth: -1,      // -1 = deactivated
4222 
4223             /**
4224              * The precision of the slider value displayed in the optional text.
4225              * @memberOf Slider.prototype
4226              * @name precision
4227              * @type Number
4228              * @default 2
4229              */
4230             precision: 2,
4231 
4232             firstArrow: false,
4233             lastArrow: false,
4234 
4235             /**
4236              * Show slider ticks.
4237              *
4238              * @type Boolean
4239              * @name Slider#withTicks
4240              * @default true
4241              */
4242             withTicks: true,
4243 
4244             /**
4245              * Show slider label.
4246              *
4247              * @type Boolean
4248              * @name Slider#withLabel
4249              * @default true
4250              */
4251             withLabel: true,
4252 
4253             /**
4254              * If not null, this replaces the part "name = " in the slider label.
4255              * Possible types: string, number or function.
4256              * @type {String}
4257              * @name suffixLabel
4258              * @memberOf Slider.prototype
4259              * @default null
4260              * @see JXG.Slider#unitLabel
4261              * @see JXG.Slider#postLabel
4262              */
4263             suffixLabel: null,
4264 
4265             /**
4266              * If not null, this is appended to the value in the slider label.
4267              * Possible types: string, number or function.
4268              * @type {String}
4269              * @name unitLabel
4270              * @memberOf Slider.prototype
4271              * @default null
4272              * @see JXG.Slider#suffixLabel
4273              * @see JXG.Slider#postLabel
4274              */
4275             unitLabel: null,
4276 
4277             /**
4278              * If not null, this is appended to the value and to unitLabel in the slider label.
4279              * Possible types: string, number or function.
4280              * @type {String}
4281              * @name postLabel
4282              * @memberOf Slider.prototype
4283              * @default null
4284              * @see JXG.Slider#suffixLabel
4285              * @see JXG.Slider#unitLabel
4286              */
4287             postLabel: null,
4288 
4289             layer: 9,
4290             showInfobox: false,
4291             name: '',
4292             visible: true,
4293             strokeColor: '#000000',
4294             highlightStrokeColor: '#888888',
4295             fillColor: '#ffffff',
4296             highlightFillColor: 'none',
4297 
4298             /**
4299              * Size of slider point.
4300              *
4301              * @type Number
4302              * @name Slider#size
4303              * @default 6
4304              * @see Point#size
4305              */
4306             size: 6,
4307 
4308             /**
4309              * Attributes for first (left) helper point defining the slider position.
4310              *
4311              * @type Point
4312              * @name Slider#point1
4313              */
4314             point1: {
4315                 needsRegularUpdate: false,
4316                 showInfobox: false,
4317                 withLabel: false,
4318                 visible: false,
4319                 fixed: true,
4320                 name: ''
4321             },
4322 
4323             /**
4324              * Attributes for second (right) helper point defining the slider position.
4325              *
4326              * @type Point
4327              * @name Slider#point2
4328              */
4329             point2: {
4330                 needsRegularUpdate: false,
4331                 showInfobox: false,
4332                 withLabel: false,
4333                 visible: false,
4334                 fixed: true,
4335                 name: ''
4336             },
4337 
4338             /**
4339              * Attributes for the base line of the slider.
4340              *
4341              * @type Line
4342              * @name Slider#baseline
4343              */
4344             baseline: {
4345                 needsRegularUpdate: false,
4346                 visible: 'inherit',
4347                 fixed: true,
4348                 scalable: false,
4349                 name: '',
4350                 strokeWidth: 1,
4351                 strokeColor: '#000000',
4352                 highlightStrokeColor: '#888888'
4353             },
4354 
4355             /**
4356              * Attributes for the ticks of the base line of the slider.
4357              *
4358              * @type Ticks
4359              * @name Slider#ticks
4360              */
4361             ticks: {
4362                 needsRegularUpdate: false,
4363                 fixed: true,
4364 
4365                 // Label drawing
4366                 drawLabels: false,
4367                 precision: 2,
4368                 includeBoundaries: 1,
4369                 drawZero: true,
4370                 label: {
4371                     offset: [-4, -14],
4372                     display: 'internal'
4373                 },
4374 
4375                 minTicksDistance: 30,
4376                 insertTicks: true,
4377                 minorHeight: 4,         // if <0: full width and height
4378                 majorHeight: 5,        // if <0: full width and height
4379                 minorTicks: 0,
4380                 defaultDistance: 1,
4381                 strokeOpacity: 1,
4382                 strokeWidth: 1,
4383                 tickEndings: [0, 1],
4384                 strokeColor: '#000000',
4385                 visible: 'inherit'
4386             },
4387 
4388             /**
4389              * Attributes for the highlighting line of the slider.
4390              *
4391              * @type Line
4392              * @name Slider#highline
4393              */
4394             highline: {
4395                 strokeWidth: 3,
4396                 visible: 'inherit',
4397                 fixed: true,
4398                 name: '',
4399                 strokeColor: '#000000',
4400                 highlightStrokeColor: '#888888'
4401             },
4402 
4403             /**
4404              * Attributes for the slider label.
4405              *
4406              * @type Label
4407              * @name Slider#label
4408              */
4409             label: {
4410                 visible: 'inherit',
4411                 strokeColor: '#000000'
4412             },
4413 
4414             /**
4415              * If true, 'up' events on the baseline will trigger slider moves.
4416              *
4417              * @type: Boolean
4418              * @name Slider#moveOnUp
4419              * @default: true
4420              */
4421             moveOnUp: true
4422 
4423             /**#@-*/
4424         },
4425 
4426         /* special options for comb */
4427         comb: {
4428             /**#@+
4429              * @visprop
4430              */
4431 
4432             /**
4433              * Frequency of comb elements.
4434              *
4435              * @type Number
4436              * @name Comb#frequency
4437              * @default 0.2
4438              */
4439             frequency: 0.2,
4440 
4441             /**
4442              * Width of the comb.
4443              *
4444              * @type Number
4445              * @name Comb#width
4446              * @default 0.4
4447              */
4448             width: 0.4,
4449 
4450             /**
4451              * Angle under which comb elements are positioned.
4452              *
4453              * @type Number
4454              * @name Comb#angle
4455              * @default 60 degrees
4456              */
4457             angle: Math.PI / 3,
4458 
4459             /**
4460              * Should the comb go right to left instead of left to right.
4461              *
4462              * @type Boolean
4463              * @name Comb#reverse
4464              * @default false
4465              */
4466             reverse: false,
4467 
4468             /**
4469              * Attributes for first defining point of the comb.
4470              *
4471              * @type Point
4472              * @name Comb#point1
4473              */
4474             point1: {
4475                 visible: false,
4476                 withLabel: false,
4477                 fixed: false,
4478                 name: ''
4479             },
4480 
4481             /**
4482              * Attributes for second defining point of the comb.
4483              *
4484              * @type Point
4485              * @name Comb#point2
4486              */
4487             point2: {
4488                 visible: false,
4489                 withLabel: false,
4490                 fixed: false,
4491                 name: ''
4492             },
4493 
4494             /**
4495              * Attributes for the curve displaying the comb.
4496              *
4497              * @type Curve
4498              * @name Comb#curve
4499              */
4500             curve: {
4501                 strokeWidth: 1,
4502                 strokeColor: '#000000',
4503                 fillColor: 'none'
4504             }
4505         },
4506 
4507         /* special options for slope triangle */
4508         slopetriangle: {
4509             /**#@+
4510              * @visprop
4511              */
4512 
4513             fillColor: 'red',
4514             fillOpacity: 0.4,
4515             highlightFillColor: 'red',
4516             highlightFillOpacity: 0.3,
4517 
4518             borders: {
4519                 lastArrow: {
4520                     type: 1,
4521                     size: 6
4522                 }
4523             },
4524 
4525             /**
4526              * Attributes for the gliding helper point.
4527              *
4528              * @type Point
4529              * @name Slopetriangle#glider
4530              */
4531             glider: {
4532                 fixed: true,
4533                 visible: false,
4534                 withLabel: false
4535             },
4536 
4537             /**
4538              * Attributes for the base line.
4539              *
4540              * @type Line
4541              * @name Slopetriangle#baseline
4542              */
4543             baseline: {
4544                 visible: false,
4545                 withLabel: false,
4546                 name: ''
4547             },
4548 
4549             /**
4550              * Attributes for the base point.
4551              *
4552              * @type Point
4553              * @name Slopetriangle#basepoint
4554              */
4555             basepoint: {
4556                 visible: false,
4557                 withLabel: false,
4558                 name: ''
4559             },
4560 
4561             /**
4562              * Attributes for the tangent.
4563              * The tangent is constructed by slop triangle if the construction
4564              * is based on a glider, solely.
4565              *
4566              * @type Line
4567              * @name Slopetriangle#tangent
4568              */
4569             tangent: {
4570                 visible: false,
4571                 withLabel: false,
4572                 name: ''
4573             },
4574 
4575             /**
4576              * Attributes for the top point.
4577              *
4578              * @type Point
4579              * @name Slopetriangle#topPoint
4580              */
4581             topPoint: {
4582                 visible: false,
4583                 withLabel: false,
4584                 name: ''
4585             },
4586 
4587             /**
4588              * Attributes for the slope triangle label.
4589              *
4590              * @type Label
4591              * @name Slopetriangle#label
4592              */
4593             label: {
4594                 visible: true
4595             }
4596             /**#@-*/
4597         },
4598 
4599         /* special options for step functions */
4600         stepfunction: {
4601             /**#@+
4602              * @visprop
4603              */
4604 
4605             /**#@-*/
4606         },
4607 
4608         /* special tape measure options */
4609         tapemeasure: {
4610             /**#@+
4611              * @visprop
4612              */
4613 
4614             strokeColor: '#000000',
4615             strokeWidth: 2,
4616             highlightStrokeColor: '#000000',
4617 
4618             /**
4619              * Show tape measure ticks.
4620              *
4621              * @type Boolean
4622              * @name Tapemeasure#withTicks
4623              * @default true
4624              */
4625             withTicks: true,
4626 
4627             /**
4628              * Show tape measure label.
4629              *
4630              * @type Boolean
4631              * @name Tapemeasure#withLabel
4632              * @default true
4633              */
4634             withLabel: true,
4635 
4636             /**
4637              * The precision of the tape measure value displayed in the optional text.
4638              * @memberOf Tapemeasure.prototype
4639              * @name precision
4640              * @type Number
4641              * @default 2
4642              */
4643             precision: 2,
4644 
4645             /**
4646              * Attributes for first helper point defining the tape measure position.
4647              *
4648              * @type Point
4649              * @name Tapemeasure#point1
4650              */
4651             point1: {
4652                 visible: 'inherit',
4653                 strokeColor: '#000000',
4654                 fillColor: '#ffffff',
4655                 fillOpacity: 0.0,
4656                 highlightFillOpacity: 0.1,
4657                 size: 6,
4658                 snapToPoints: true,
4659                 attractorUnit: 'screen',
4660                 attractorDistance: 20,
4661                 showInfobox: false,
4662                 withLabel: false,
4663                 name: ''
4664             },
4665 
4666             /**
4667              * Attributes for second helper point defining the tape measure position.
4668              *
4669              * @type Point
4670              * @name Tapemeasure#point2
4671              */
4672             point2: {
4673                 visible: 'inherit',
4674                 strokeColor: '#000000',
4675                 fillColor: '#ffffff',
4676                 fillOpacity: 0.0,
4677                 highlightFillOpacity: 0.1,
4678                 size: 6,
4679                 snapToPoints: true,
4680                 attractorUnit: 'screen',
4681                 attractorDistance: 20,
4682                 showInfobox: false,
4683                 withLabel: false,
4684                 name: ''
4685             },
4686 
4687             /**
4688              * Attributes for the ticks of the tape measure.
4689              *
4690              * @type Ticks
4691              * @name Tapemeasure#ticks
4692              */
4693             ticks: {
4694                 drawLabels: false,
4695                 drawZero: true,
4696                 insertTicks: true,
4697                 minorHeight: 8,
4698                 majorHeight: 16,
4699                 minorTicks: 4,
4700                 tickEndings: [0, 1],
4701                 defaultDistance: 0.1,
4702                 strokeOpacity: 1,
4703                 strokeWidth: 1,
4704                 strokeColor: '#000000',
4705                 visible: 'inherit'
4706             },
4707 
4708             /**
4709              * Attributes for the tape measure label.
4710              *
4711              * @type Label
4712              * @name Tapemeasure#label
4713              */
4714             label: {
4715                 position: 'top'
4716             }
4717             /**#@-*/
4718         },
4719 
4720         /* special text options */
4721         text: {
4722             /**#@+
4723              * @visprop
4724              */
4725 
4726             /**
4727              * The font size in pixels.
4728              *
4729              * @name fontSize
4730              * @memberOf Text.prototype
4731              * @default 12
4732              * @type Number
4733              */
4734             fontSize: 12,
4735 
4736             /**
4737              * Used to round texts given by a number.
4738              *
4739              * @name digits
4740              * @memberOf Text.prototype
4741              * @default 2
4742              * @type Number
4743              */
4744             digits: 2,
4745 
4746             /**
4747              * If set to true, the text is parsed and evaluated.
4748              * For labels parse==true results in converting names of the form k_a to subscripts.
4749              * If the text is given by string and parse==true, the string is parsed as
4750              * JessieCode expression.
4751              *
4752              * @name parse
4753              * @memberOf Text.prototype
4754              * @default true
4755              * @type Boolean
4756              */
4757             parse: true,
4758 
4759             /**
4760              * If set to true and caja's sanitizeHTML function can be found it
4761              * will be used to sanitize text output.
4762              *
4763              * @name useCaja
4764              * @memberOf Text.prototype
4765              * @default false
4766              * @type Boolean
4767              */
4768             useCaja: false,
4769 
4770             /**
4771              * If enabled, the text will be handled as label. Intended for internal use.
4772              *
4773              * @name isLabel
4774              * @memberOf Text.prototype
4775              * @default false
4776              * @type Boolean
4777              */
4778             isLabel: false,
4779 
4780             strokeColor: 'black',
4781             highlightStrokeColor: 'black',
4782             highlightStrokeOpacity: 0.666666,
4783 
4784             /**
4785              * Default CSS properties of the HTML text element.
4786              * <p>
4787              * The CSS properties which are set here, are handed over to the style property
4788              * of the HTML text element. That means, they have higher property than any
4789              * CSS class.
4790              * <p>
4791              * If a property which is set here should be overruled by a CSS class
4792              * then this property should be removed here.
4793              * <p>
4794              * The reason, why this attribute should be kept to its default value at all,
4795              * is that screen dumps of SVG boards with <tt>board.renderer.dumpToCanvas()</tt>
4796              * will ignore the font-family if it is set in a CSS class.
4797              * It has to be set explicitly as style attribute.
4798              * <p>
4799              * In summary, the order of priorities from high to low is
4800              * <ol>
4801              *  <li> JXG.Options.text.cssStyle
4802              *  <li> JXG.Options.text.cssDefaultStyle
4803              *  <li> JXG.Options.text.cssClass
4804              * </ol>
4805              * @example
4806              * If all texts should get its font-family from the default CSS class
4807              * before initializing the board
4808              * <pre>
4809              *   JXG.Options.text.cssDefaultStyle = '';
4810              *   JXG.Options.text.highlightCssDefaultStyle = '';
4811              * </pre>
4812              * should be called.
4813              *
4814              * @name cssDefaultStyle
4815              * @memberOf Text.prototype
4816              * @default  'font-family: Arial, Helvetica, Geneva, sans-serif;'
4817              * @type String
4818              * @see Text#highlightCssDefaultStyle
4819              * @see Text#cssStyle
4820              * @see Text#highlightCssStyle
4821              */
4822             cssDefaultStyle: 'font-family: Arial, Helvetica, Geneva, sans-serif;',
4823 
4824             /**
4825              * Default CSS properties of the HTML text element in case of highlighting.
4826              * <p>
4827              * The CSS properties which are set here, are handed over to the style property
4828              * of the HTML text element. That means, they have higher property than any
4829              * CSS class.
4830              * @example
4831              * If all texts should get its font-family from the default CSS class
4832              * before initializing the board
4833              * <pre>
4834              *   JXG.Options.text.cssDefaultStyle = '';
4835              *   JXG.Options.text.highlightCssDefaultStyle = '';
4836              * </pre>
4837              * should be called.
4838              *
4839              * @name highlightCssDefaultStyle
4840              * @memberOf Text.prototype
4841              * @default  'font-family: Arial, Helvetica, Geneva, sans-serif;'
4842              * @type String
4843              * @see Text#cssDefaultStyle
4844              * @see Text#cssStyle
4845              * @see Text#highlightCssStyle
4846             */
4847             highlightCssDefaultStyle: 'font-family: Arial, Helvetica, Geneva, sans-serif;',
4848 
4849             /**
4850              * CSS properties of the HTML text element.
4851              * <p>
4852              * The CSS properties which are set here, are handed over to the style property
4853              * of the HTML text element. That means, they have higher property than any
4854              * CSS class.
4855              *
4856              * @name cssStyle
4857              * @memberOf Text.prototype
4858              * @default  ''
4859              * @type String
4860              * @see Text#cssDefaultStyle
4861              * @see Text#highlightCssDefaultStyle
4862              * @see Text#highlightCssStyle
4863             */
4864             cssStyle: '',
4865 
4866             /**
4867              * CSS properties of the HTML text element in case of highlighting.
4868              * <p>
4869              * The CSS properties which are set here, are handed over to the style property
4870              * of the HTML text element. That means, they have higher property than any
4871              * CSS class.
4872              *
4873              * @name highlightCssStyle
4874              * @memberOf Text.prototype
4875              * @default  ''
4876              * @type String
4877              * @see Text#cssDefaultStyle
4878              * @see Text#highlightCssDefaultStyle
4879              * @see Text#cssStyle
4880             */
4881             highlightCssStyle: '',
4882 
4883             /**
4884              * If true, the input will be given to ASCIIMathML before rendering.
4885              *
4886              * @name useASCIIMathML
4887              * @memberOf Text.prototype
4888              * @default false
4889              * @type Boolean
4890              */
4891             useASCIIMathML: false,
4892 
4893             /**
4894              * If true, MathJax will be used to render the input string.
4895              * Supports MathJax 2 as well as Mathjax 3.
4896              * It is recommended to use this option together with the option
4897              * "parse: false". Otherwise, 4 backslashes (e.g. \\\\alpha) are needed
4898              * instead of two (e.g. \\alpha).
4899              *
4900              * @name useMathJax
4901              * @memberOf Text.prototype
4902              * @default false
4903              * @type Boolean
4904              * @see Text#parse
4905              *
4906              * @example
4907              *  // Before loading MathJax, it has to be configured something like this:
4908              * window.MathJax = {
4909              *   tex: {
4910              *     inlineMath: [ ['$','$'], ["\\(","\\)"] ],
4911              *     displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
4912              *     packages: ['base', 'ams']
4913              *   },
4914              *   options: {
4915              *     ignoreHtmlClass: 'tex2jax_ignore',
4916              *     processHtmlClass: 'tex2jax_process'
4917              *   }
4918              * };
4919              *
4920              * // Display style
4921              * board.create('text',[ 2,2,  function(){return '$$X=\\frac{2}{x}$$'}], {
4922              *     fontSize: 15, color:'green', useMathJax: true});
4923              *
4924              * // Inline style
4925              * board.create('text',[-2,2,  function(){return '$X_A=\\frac{2}{x}$'}], {
4926              *     fontSize: 15, color:'green', useMathJax: true});
4927              *
4928              * var A = board.create('point', [-2, 0]);
4929              * var B = board.create('point', [1, 0]);
4930              * var C = board.create('point', [0, 1]);
4931              *
4932              * var graph = board.create('ellipse', [A, B, C], {
4933              *         fixed: true,
4934              *         withLabel: true,
4935              *         strokeColor: 'black',
4936              *         strokeWidth: 2,
4937              *         fillColor: '#cccccc',
4938              *         fillOpacity: 0.3,
4939              *         highlightStrokeColor: 'red',
4940              *         highlightStrokeWidth: 3,
4941              *         name: '$1=\\frac{(x-h)^2}{a^2}+\\frac{(y-k)^2}{b^2}$',
4942              *         label: {useMathJax: true}
4943              *     });
4944              *
4945              * var nvect1 = board.create('text', [-4, -3, '\\[\\overrightarrow{V}\\]'],
4946              * {
4947              *   fontSize: 24, parse: false
4948              * });
4949              * var nvect1 = board.create('text', [-2, -4, function() {return '$\\overrightarrow{G}$';}],
4950              * {
4951              *   fontSize: 24, useMathJax: true
4952              * });
4953              *
4954              * </pre>
4955              * <script>
4956              * window.MathJax = {
4957              *   tex: {
4958              *     inlineMath: [ ['$','$'], ["\\(","\\)"] ],
4959              *     displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
4960              *     packages: ['base', 'ams']
4961              *   },
4962              *   options: {
4963              *     ignoreHtmlClass: 'tex2jax_ignore',
4964              *     processHtmlClass: 'tex2jax_process'
4965              *   }
4966              * };
4967              * </script>
4968              * <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script"></script>
4969              * <div id="JXGe2a04876-5813-4db0-b7e8-e48bf4e220b9" class="jxgbox" style="width: 400px; height: 400px;"></div>
4970              * <script type="text/javascript">
4971              *     (function() {
4972              *         var board = JXG.JSXGraph.initBoard('JXGe2a04876-5813-4db0-b7e8-e48bf4e220b9',
4973              *             {boundingbox: [-5, 5, 5, -5], axis: true, showcopyright: false, shownavigation: false});
4974              *     // Display style
4975              *     board.create('text',[ 2,2,  function(){return '$$X=\\frac{2}{x}$$'}], {
4976              *         fontSize: 15, color:'green', useMathJax: true});
4977              *
4978              *     // Inline style
4979              *     board.create('text',[-2,2,  function(){return '$X_A=\\frac{2}{x}$'}], {
4980              *         fontSize: 15, color:'green', useMathJax: true});
4981              *
4982              *     var A = board.create('point', [-2, 0]);
4983              *     var B = board.create('point', [1, 0]);
4984              *     var C = board.create('point', [0, 1]);
4985              *
4986              *     var graph = board.create('ellipse', [A, B, C], {
4987              *             fixed: true,
4988              *             withLabel: true,
4989              *             strokeColor: 'black',
4990              *             strokeWidth: 2,
4991              *             fillColor: '#cccccc',
4992              *             fillOpacity: 0.3,
4993              *             highlightStrokeColor: 'red',
4994              *             highlightStrokeWidth: 3,
4995              *             name: '$1=\\frac{(x-h)^2}{a^2}+\\frac{(y-k)^2}{b^2}$',
4996              *             label: {useMathJax: true}
4997              *         });
4998              *
4999              *     var nvect1 = board.create('text', [-4, -3, '\\[\\overrightarrow{V}\\]'],
5000              *     {
5001              *       fontSize: 24, parse: false
5002              *     });
5003              *     var nvect1 = board.create('text', [-2, -4, function() {return '$\\overrightarrow{G}$';}],
5004              *     {
5005              *       fontSize: 24, useMathJax: true
5006              *     });
5007              *     })();
5008              *
5009              * </script><pre>
5010              *
5011              *
5012              * @example
5013              * // Load MathJax:
5014              * // <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
5015              *
5016              * // function and its derivative
5017              * var f1 = function(x) { return x * x * x; },
5018              * graph1 = board.create('functiongraph', [f1, -0.1, 1.1]),
5019              *
5020              * A = board.create('glider', [0.5, f1(0.5), graph1], {
5021              *             name: 'f(x)',
5022              *             color: 'black',
5023              *             face:'x',
5024              *             fixed: true,
5025              *             size: 3,
5026              *             label: {offset: [-30, 10], fontSize: 15}
5027              *         }),
5028              * B = board.create('glider', [0.7, f1(0.7), graph1], {
5029              *             name: 'f(x+Δx)',
5030              *             size: 3,
5031              *             label: {offset: [-60, 10], fontSize: 15}
5032              *         }),
5033              *
5034              * secant_line = board.create('line', [A,B],{dash: 1, color: 'green'}),
5035              * a_h_segment = board.create('segment', [A, [
5036              *                     function(){ return B.X() > A.X() ? B.X() : A.X()},
5037              *                     function(){ return B.X() > A.X() ? A.Y() : B.Y()}
5038              *                 ]],{ name: 'Δx', dash: 1, color: 'black'});
5039              *
5040              * b_v_segment = board.create('segment', [B, [
5041              *                     function(){ return B.X() > A.X() ? B.X() : A.X()},
5042              *                     function(){ return B.X() > A.X() ? A.Y() : B.Y()}
5043              *                 ]],{ name: 'Δy', dash: 1, color: 'black'}),
5044              *
5045              * ma = board.create('midpoint', [a_h_segment.point1, a_h_segment.point2
5046              *     ], {visible: false});
5047              *
5048              * board.create('text', [0, 0, function() {return '\\[\\Delta_x='+(B.X()-A.X()).toFixed(4)+'\\]'}], {
5049              *     anchor: ma, useMathJax: true, fixed: true, color: 'green', anchorY: 'top'
5050              * });
5051              *
5052              * mb = board.create('midpoint', [b_v_segment.point1, b_v_segment.point2], {visible: false});
5053              * board.create('text', [0, 0, function() {return '\\[\\Delta_y='+(B.Y()-A.Y()).toFixed(4)+'\\]'}], {
5054              *     anchor: mb, useMathJax: true, fixed: true, color: 'green'
5055              * });
5056              *
5057              * dval = board.create('text',[0.1, 0.8,
5058              *     function(){
5059              *         return '\\[\\frac{\\Delta_y}{\\Delta_x}=\\frac{' + ((B.Y()-A.Y()).toFixed(4)) + '}{' + ((B.X()-A.X()).toFixed(4)) +
5060              *             '}=' + (((B.Y()-A.Y()).toFixed(4))/((B.X()-A.X()).toFixed(4))).toFixed(4) + '\\]';
5061              *     }],{fontSize: 15, useMathJax: true});
5062              *
5063              * </pre>
5064              * <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script"></script>
5065              * <div id="JXG8c2b65e7-4fc4-43f7-b23c-5076a7fa9621" class="jxgbox" style="width: 400px; height: 400px;"></div>
5066              * <script type="text/javascript">
5067              *     (function() {
5068              *         var board = JXG.JSXGraph.initBoard('JXG8c2b65e7-4fc4-43f7-b23c-5076a7fa9621',
5069              *             {boundingbox: [-0.1, 1.1, 1.1, -0.1], axis: true, showcopyright: false, shownavigation: false});
5070              *     // function and its derivative
5071              *     var f1 = function(x) { return x * x * x; },
5072              *     graph1 = board.create('functiongraph', [f1, -0.1, 1.1]),
5073              *
5074              *     A = board.create('glider', [0.5, f1(0.5), graph1], {
5075              *                 name: 'f(x)',
5076              *                 color: 'black',
5077              *                 face:'x',
5078              *                 fixed: true,
5079              *                 size: 3,
5080              *                 label: {offset: [-30, 10], fontSize: 15}
5081              *             }),
5082              *     B = board.create('glider', [0.7, f1(0.7), graph1], {
5083              *                 name: 'f(x+Δx)',
5084              *                 size: 3,
5085              *                 label: {offset: [-60, 10], fontSize: 15}
5086              *             }),
5087              *
5088              *     secant_line = board.create('line', [A,B],{dash: 1, color: 'green'}),
5089              *     a_h_segment = board.create('segment', [A, [
5090              *                         function(){ return B.X() > A.X() ? B.X() : A.X()},
5091              *                         function(){ return B.X() > A.X() ? A.Y() : B.Y()}
5092              *                     ]],{ name: 'Δx', dash: 1, color: 'black'});
5093              *
5094              *     b_v_segment = board.create('segment', [B, [
5095              *                         function(){ return B.X() > A.X() ? B.X() : A.X()},
5096              *                         function(){ return B.X() > A.X() ? A.Y() : B.Y()}
5097              *                     ]],{ name: 'Δy', dash: 1, color: 'black'}),
5098              *
5099              *     ma = board.create('midpoint', [a_h_segment.point1, a_h_segment.point2
5100              *         ], {visible: false});
5101              *
5102              *     board.create('text', [0, 0, function() {return '\\[\\Delta_x='+(B.X()-A.X()).toFixed(4)+'\\]'}], {
5103              *         anchor: ma, useMathJax: true, fixed: true, color: 'green', anchorY: 'top'
5104              *     });
5105              *
5106              *     mb = board.create('midpoint', [b_v_segment.point1, b_v_segment.point2], {visible: false});
5107              *     board.create('text', [0, 0, function() {return '\\[\\Delta_y='+(B.Y()-A.Y()).toFixed(4)+'\\]'}], {
5108              *         anchor: mb, useMathJax: true, fixed: true, color: 'green'
5109              *     });
5110              *
5111              *     dval = board.create('text',[0.1, 0.8,
5112              *         function(){
5113              *             return '\\[\\frac{\\Delta_y}{\\Delta_x}=\\frac{' + ((B.Y()-A.Y()).toFixed(4)) + '}{' + ((B.X()-A.X()).toFixed(4)) +
5114              *                 '}=' + (((B.Y()-A.Y()).toFixed(4))/((B.X()-A.X()).toFixed(4))).toFixed(4) + '\\]';
5115              *         }],{fontSize: 15, useMathJax: true});
5116              *
5117              *     })();
5118              *
5119              * </script><pre>
5120              *
5121              */
5122             useMathJax: false,
5123 
5124             useKatex: false,
5125 
5126             /**
5127              * Determines the rendering method of the text. Possible values
5128              * include <tt>'html'</tt> and <tt>'internal</tt>.
5129              *
5130              * @name display
5131              * @memberOf Text.prototype
5132              * @default 'html'
5133              * @type String
5134              */
5135             display: 'html',
5136 
5137             /**
5138              * Anchor element {@link Point}, {@link Text} or {@link Image} of the text. If it exists, the coordinates of the text are relative
5139              * to this anchor element.
5140              *
5141              * @name anchor
5142              * @memberOf Text.prototype
5143              * @default null
5144              * @type Object
5145              */
5146             anchor: null,
5147 
5148             /**
5149              * The horizontal alignment of the text. Possible values include <tt>'auto</tt>, <tt>'left'</tt>, <tt>'middle'</tt>, and
5150              * <tt>'right'</tt>.
5151              *
5152              * @name anchorX
5153              * @memberOf Text.prototype
5154              * @default 'left'
5155              * @type String
5156              */
5157             anchorX: 'left',
5158 
5159             /**
5160              * The vertical alignment of the text. Possible values include <tt>'auto</tt>, <tt>'top'</tt>, <tt>'middle'</tt>, and
5161              * <tt>'bottom'</tt>.
5162              *
5163              * @name anchorY
5164              * @memberOf Text.prototype
5165              * @default 'auto'
5166              * @type String
5167              */
5168             anchorY: 'middle',
5169 
5170             /**
5171              * CSS class of the text in non-highlighted view.
5172              *
5173              * @name cssClass
5174              * @memberOf Text.prototype
5175              * @type String
5176              */
5177             cssClass: 'JXGtext',
5178 
5179             /**
5180              * CSS class of the text in highlighted view.
5181              *
5182              * @name highlightCssClass
5183              * @memberOf Text.prototype
5184              * @type String
5185              */
5186             highlightCssClass: 'JXGtext',
5187 
5188             /**
5189              * Sensitive area for dragging the text.
5190              * Possible values are 'all', or something else.
5191              * If set to 'small', a sensitivity margin at the right and left border is taken.
5192              * This may be extended to left, right, ... in the future.
5193              *
5194              * @name Text#dragArea
5195              * @type String
5196              * @default 'all'
5197              */
5198             dragArea: 'all',
5199 
5200             withLabel: false,
5201 
5202             /**
5203              * Text rotation in degrees.
5204              * Works for non-zero values only in combination with display=='internal'.
5205              *
5206              * @name Text#rotate
5207              * @type Number
5208              * @default 0
5209              */
5210             rotate: 0,
5211 
5212             visible: true,
5213 
5214             /**
5215              * Defines together with {@link Text#snapSizeY} the grid the text snaps on to.
5216              * The text will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
5217              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
5218              * of the default ticks of the default x axes of the board.
5219              *
5220              * @name snapSizeX
5221              * @memberOf Text.prototype
5222              *
5223              * @see Point#snapToGrid
5224              * @see Text#snapSizeY
5225              * @see JXG.Board#defaultAxes
5226              * @type Number
5227              * @default 1
5228              */
5229             snapSizeX: 1,
5230 
5231             /**
5232              * Defines together with {@link Text#snapSizeX} the grid the text snaps on to.
5233              * The text will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
5234              * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
5235              * of the default ticks of the default y axes of the board.
5236              *
5237              * @name snapSizeY
5238              * @memberOf Text.prototype
5239              *
5240              * @see Point#snapToGrid
5241              * @see Text#snapSizeX
5242              * @see JXG.Board#defaultAxes
5243              * @type Number
5244              * @default 1
5245              */
5246             snapSizeY: 1,
5247 
5248             /**
5249              * List of attractor elements. If the distance of the text is less than
5250              * attractorDistance the text is made to glider of this element.
5251              *
5252              * @name attractors
5253              * @memberOf Text.prototype
5254              * @type Array
5255              * @default empty
5256              */
5257             attractors: []
5258 
5259             /**#@-*/
5260         },
5261 
5262         /* special options for trace curves */
5263         tracecurve: {
5264             /**#@+
5265              * @visprop
5266              */
5267             strokeColor: '#000000',
5268             fillColor: 'none',
5269 
5270             /**
5271              * The number of evaluated data points.
5272              * @memberOf Tracecurve.prototype
5273              * @default 100
5274              * @name numberPoints
5275              * @type Number
5276              */
5277             numberPoints: 100
5278 
5279             /**#@-*/
5280         },
5281 
5282         /*special turtle options */
5283         turtle: {
5284             /**#@+
5285              * @visprop
5286              */
5287 
5288             strokeWidth: 1,
5289             fillColor: 'none',
5290             strokeColor: '#000000',
5291 
5292             /**
5293              * Attributes for the turtle arrow.
5294              *
5295              * @type Curve
5296              * @name Turtle#arrow
5297              */
5298             arrow: {
5299                 strokeWidth: 2,
5300                 withLabel: false,
5301                 strokeColor: '#ff0000',
5302                 lastArrow: true
5303             }
5304             /**#@-*/
5305         },
5306 
5307         /**
5308          * Abbreviations of attributes. Setting the shortcut means setting abbreviated properties
5309          * to the same value.
5310          * It is used in {@link JXG.GeometryElement#setAttribute} and in
5311          * the constructor {@link JXG.GeometryElement}.
5312          * Attention: In Options.js abbreviations are not allowed.
5313          * @type {Object}
5314          * @name JXG.Options#shortcuts
5315          *
5316          */
5317         shortcuts: {
5318             color: ['strokeColor', 'fillColor'],
5319             opacity: ['strokeOpacity', 'fillOpacity'],
5320             highlightColor: ['highlightStrokeColor', 'highlightFillColor'],
5321             highlightOpacity: ['highlightStrokeOpacity', 'highlightFillOpacity'],
5322             strokeWidth: ['strokeWidth', 'highlightStrokeWidth']
5323         }
5324     };
5325 
5326     /**
5327      * Holds all possible properties and the according validators for geometry elements.
5328      * A validator is either a function
5329      * which takes one parameter and returns true, if the value is valid for the property,
5330      * or it is false if no validator is required.
5331      */
5332     JXG.Validator = (function () {
5333         var i,
5334             validatePixel = function (v) {
5335                 return (/^[0-9]+px$/).test(v);
5336             },
5337             validateDisplay = function (v) {
5338                 return (v  === 'html' || v === 'internal');
5339             },
5340             validateColor = function (v) {
5341                 // for now this should do it...
5342                 return Type.isString(v);
5343             },
5344             validatePointFace = function (v) {
5345                 return Type.exists(JXG.normalizePointFace(v));
5346             },
5347             validateInteger = function (v) {
5348                 return (Math.abs(v - Math.round(v)) < Mat.eps);
5349             },
5350             validateNotNegativeInteger = function (v) {
5351                 return validateInteger(v) && v >= 0;
5352             },
5353             validatePositiveInteger = function (v) {
5354                 return validateInteger(v) && v > 0;
5355             },
5356             validateScreenCoords = function (v) {
5357                 return v.length >= 2 && validateInteger(v[0]) && validateInteger(v[1]);
5358             },
5359             validateRenderer = function (v) {
5360                 return (v === 'vml' || v === 'svg' || v === 'canvas' || v === 'no');
5361             },
5362             validatePositive = function (v) {
5363                 return v > 0;
5364             },
5365             validateNotNegative = function (v) {
5366                 return v >= 0;
5367             },
5368             v = {},
5369             validators = {
5370                 attractorDistance: validateNotNegative,
5371                 color: validateColor,
5372                 defaultDistance: Type.isNumber,
5373                 display: validateDisplay,
5374                 doAdvancedPlot: false,
5375                 draft: false,
5376                 drawLabels: false,
5377                 drawZero: false,
5378                 face: validatePointFace,
5379                 factor: Type.isNumber,
5380                 fillColor: validateColor,
5381                 fillOpacity: Type.isNumber,
5382                 firstArrow: false,
5383                 fontSize: validateInteger,
5384                 dash: validateInteger,
5385                 gridX: Type.isNumber,
5386                 gridY: Type.isNumber,
5387                 hasGrid: false,
5388                 highlightFillColor: validateColor,
5389                 highlightFillOpacity: Type.isNumber,
5390                 highlightStrokeColor: validateColor,
5391                 highlightStrokeOpacity: Type.isNumber,
5392                 insertTicks: false,
5393                 //: validateScreenCoords,
5394                 lastArrow: false,
5395                 layer: validateNotNegativeInteger,
5396                 majorHeight: validateInteger,
5397                 minorHeight: validateInteger,
5398                 minorTicks: validateNotNegative,
5399                 minTicksDistance: validatePositiveInteger,
5400                 numberPointsHigh: validatePositiveInteger,
5401                 numberPointsLow: validatePositiveInteger,
5402                 opacity: Type.isNumber,
5403                 radius: Type.isNumber,
5404                 RDPsmoothing: false,
5405                 renderer: validateRenderer,
5406                 right: validatePixel,
5407                 showCopyright: false,
5408                 showInfobox: false,
5409                 showNavigation: false,
5410                 size: validateNotNegative, //validateInteger,
5411                 snapSizeX: validatePositive,
5412                 snapSizeY: validatePositive,
5413                 snapWidth: Type.isNumber,
5414                 snapToGrid: false,
5415                 snatchDistance: validateNotNegative,
5416                 straightFirst: false,
5417                 straightLast: false,
5418                 stretch: false,
5419                 strokeColor: validateColor,
5420                 strokeOpacity: Type.isNumber,
5421                 strokeWidth: validateNotNegative, //validateInteger,
5422                 takeFirst: false,
5423                 takeSizeFromFile: false,
5424                 to10: false,
5425                 toOrigin: false,
5426                 translateTo10: false,
5427                 translateToOrigin: false,
5428                 useASCIIMathML: false,
5429                 useDirection: false,
5430                 useMathJax: false,
5431                 withLabel: false,
5432                 withTicks: false,
5433                 zoom: false
5434             };
5435 
5436         // this seems like a redundant step but it makes sure that
5437         // all properties in the validator object have lower case names
5438         // and the validator object is easier to read.
5439         for (i in validators) {
5440             if (validators.hasOwnProperty(i)) {
5441                 v[i.toLowerCase()] = validators[i];
5442             }
5443         }
5444 
5445         return v;
5446     }());
5447 
5448     /**
5449      * All point faces can be defined with more than one name, e.g. a cross faced point can be given
5450      * by face equal to 'cross' or equal to 'x'. This method maps all possible values to fixed ones to
5451      * simplify if- and switch-clauses regarding point faces. The translation table is as follows:
5452      * <table>
5453      * <tr><th>Input</th><th>Output</th></tr>
5454      * <tr><td>cross, x</td><td>x</td></tr>
5455      * <tr><td>circle, o</td><td>o</td></tr>
5456      * <tr><td>square, []</td><td>[]</td></tr>
5457      * <tr><td>plus, +</td><td>+</td></tr>
5458      * <tr><td>diamond, <></td><td><></td></tr>
5459      * <tr><td>triangleup, a, ^</td><td>A</td></tr>
5460      * <tr><td>triangledown, v</td><td>v</td></tr>
5461      * <tr><td>triangleleft, <</td><td><</td></tr>
5462      * <tr><td>triangleright, ></td><td>></td></tr>
5463      * </table>
5464      * @param {String} s A string which should determine a valid point face.
5465      * @returns {String} Returns a normalized string or undefined if the given string is not a valid
5466      * point face.
5467      */
5468     JXG.normalizePointFace = function (s) {
5469         var map = {
5470             cross: 'x',
5471             x: 'x',
5472             circle: 'o',
5473             o: 'o',
5474             square: '[]',
5475             '[]': '[]',
5476             plus: '+',
5477             '+': '+',
5478             diamond: '<>',
5479             '<>': '<>',
5480             triangleup: '^',
5481             a: '^',
5482             '^': '^',
5483             triangledown: 'v',
5484             v: 'v',
5485             triangleleft: '<',
5486             '<': '<',
5487             triangleright: '>',
5488             '>': '>'
5489         };
5490 
5491         return map[s];
5492     };
5493 
5494 
5495     /**
5496      * Apply the options stored in this object to all objects on the given board.
5497      * @param {JXG.Board} board The board to which objects the options will be applied.
5498      */
5499     JXG.useStandardOptions = function (board) {
5500         var el, t, p, copyProps,
5501             o = JXG.Options,
5502             boardHadGrid = board.hasGrid;
5503 
5504         board.options.grid.hasGrid = o.grid.hasGrid;
5505         board.options.grid.gridX = o.grid.gridX;
5506         board.options.grid.gridY = o.grid.gridY;
5507         board.options.grid.gridColor = o.grid.gridColor;
5508         board.options.grid.gridOpacity = o.grid.gridOpacity;
5509         board.options.grid.gridDash = o.grid.gridDash;
5510         board.options.grid.snapToGrid = o.grid.snapToGrid;
5511         board.options.grid.snapSizeX = o.grid.SnapSizeX;
5512         board.options.grid.snapSizeY = o.grid.SnapSizeY;
5513         board.takeSizeFromFile = o.takeSizeFromFile;
5514 
5515         copyProps = function (p, o) {
5516             p.visProp.fillcolor = o.fillColor;
5517             p.visProp.highlightfillcolor = o.highlightFillColor;
5518             p.visProp.strokecolor = o.strokeColor;
5519             p.visProp.highlightstrokecolor = o.highlightStrokeColor;
5520         };
5521 
5522         for (el in board.objects) {
5523             if (board.objects.hasOwnProperty(el)) {
5524                 p = board.objects[el];
5525                 if (p.elementClass === Const.OBJECT_CLASS_POINT) {
5526                     copyProps(p, o.point);
5527                 } else if (p.elementClass === Const.OBJECT_CLASS_LINE) {
5528                     copyProps(p, o.line);
5529 
5530                     for (t = 0; t < p.ticks.length; t++) {
5531                         p.ticks[t].majorTicks = o.line.ticks.majorTicks;
5532                         p.ticks[t].minTicksDistance = o.line.ticks.minTicksDistance;
5533                         p.ticks[t].visProp.minorheight = o.line.ticks.minorHeight;
5534                         p.ticks[t].visProp.majorheight = o.line.ticks.majorHeight;
5535                     }
5536                 } else if (p.elementClass === Const.OBJECT_CLASS_CIRCLE) {
5537                     copyProps(p, o.circle);
5538                 } else if (p.type === Const.OBJECT_TYPE_ANGLE) {
5539                     copyProps(p, o.angle);
5540                 } else if (p.type === Const.OBJECT_TYPE_ARC) {
5541                     copyProps(p, o.arc);
5542                 } else if (p.type === Const.OBJECT_TYPE_POLYGON) {
5543                     copyProps(p, o.polygon);
5544                 } else if (p.type === Const.OBJECT_TYPE_CONIC) {
5545                     copyProps(p, o.conic);
5546                 } else if (p.type === Const.OBJECT_TYPE_CURVE) {
5547                     copyProps(p, o.curve);
5548                 } else if (p.type === Const.OBJECT_TYPE_SECTOR) {
5549                     p.arc.visProp.fillcolor = o.sector.fillColor;
5550                     p.arc.visProp.highlightfillcolor = o.sector.highlightFillColor;
5551                     p.arc.visProp.fillopacity = o.sector.fillOpacity;
5552                     p.arc.visProp.highlightfillopacity = o.sector.highlightFillOpacity;
5553                 }
5554             }
5555         }
5556 
5557         board.fullUpdate();
5558         if (boardHadGrid && !board.hasGrid) {
5559             board.removeGrids(board);
5560         } else if (!boardHadGrid && board.hasGrid) {
5561             board.create('grid', []);
5562         }
5563     };
5564 
5565     /**
5566      * Converts all color values to greyscale and calls useStandardOption to put them onto the board.
5567      * @param {JXG.Board} board The board to which objects the options will be applied.
5568      * @see #useStandardOptions
5569      */
5570     JXG.useBlackWhiteOptions = function (board) {
5571         var o = JXG.Options;
5572         o.point.fillColor = Color.rgb2bw(o.point.fillColor);
5573         o.point.highlightFillColor = Color.rgb2bw(o.point.highlightFillColor);
5574         o.point.strokeColor = Color.rgb2bw(o.point.strokeColor);
5575         o.point.highlightStrokeColor = Color.rgb2bw(o.point.highlightStrokeColor);
5576 
5577         o.line.fillColor = Color.rgb2bw(o.line.fillColor);
5578         o.line.highlightFillColor = Color.rgb2bw(o.line.highlightFillColor);
5579         o.line.strokeColor = Color.rgb2bw(o.line.strokeColor);
5580         o.line.highlightStrokeColor = Color.rgb2bw(o.line.highlightStrokeColor);
5581 
5582         o.circle.fillColor = Color.rgb2bw(o.circle.fillColor);
5583         o.circle.highlightFillColor = Color.rgb2bw(o.circle.highlightFillColor);
5584         o.circle.strokeColor = Color.rgb2bw(o.circle.strokeColor);
5585         o.circle.highlightStrokeColor = Color.rgb2bw(o.circle.highlightStrokeColor);
5586 
5587         o.arc.fillColor = Color.rgb2bw(o.arc.fillColor);
5588         o.arc.highlightFillColor = Color.rgb2bw(o.arc.highlightFillColor);
5589         o.arc.strokeColor = Color.rgb2bw(o.arc.strokeColor);
5590         o.arc.highlightStrokeColor = Color.rgb2bw(o.arc.highlightStrokeColor);
5591 
5592         o.polygon.fillColor = Color.rgb2bw(o.polygon.fillColor);
5593         o.polygon.highlightFillColor  = Color.rgb2bw(o.polygon.highlightFillColor);
5594 
5595         o.sector.fillColor = Color.rgb2bw(o.sector.fillColor);
5596         o.sector.highlightFillColor  = Color.rgb2bw(o.sector.highlightFillColor);
5597 
5598         o.curve.strokeColor = Color.rgb2bw(o.curve.strokeColor);
5599         o.grid.gridColor = Color.rgb2bw(o.grid.gridColor);
5600 
5601         JXG.useStandardOptions(board);
5602     };
5603 
5604     // needs to be exported
5605     JXG.Options.normalizePointFace = JXG.normalizePointFace;
5606 
5607     return JXG.Options;
5608 });
5609