jsxgraph 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +2 -2
  2. package/distrib/README.md +2 -2
  3. package/distrib/geogebra.min.js +3 -3
  4. package/distrib/geonext.min.js +3 -3
  5. package/distrib/index.d.ts +651 -448
  6. package/distrib/intergeo.min.js +3 -3
  7. package/distrib/jsxgraph.css +4 -13
  8. package/distrib/jsxgraphcore.js +9 -25
  9. package/distrib/jsxgraphsrc.js +28203 -25234
  10. package/distrib/sketch.min.js +3 -3
  11. package/package.json +11 -22
  12. package/src/base/board.js +674 -469
  13. package/src/base/chart.js +1 -1
  14. package/src/base/circle.js +23 -1
  15. package/src/base/composition.js +1 -1
  16. package/src/base/constants.js +32 -11
  17. package/src/base/coords.js +4 -4
  18. package/src/base/coordselement.js +51 -24
  19. package/src/base/curve.js +308 -117
  20. package/src/base/element.js +79 -50
  21. package/src/base/foreignobject.js +463 -0
  22. package/src/base/group.js +2 -2
  23. package/src/base/image.js +12 -15
  24. package/src/base/line.js +108 -21
  25. package/src/base/point.js +24 -28
  26. package/src/base/polygon.js +75 -18
  27. package/src/base/text.js +116 -63
  28. package/src/base/ticks.js +29 -11
  29. package/src/base/transformation.js +1 -1
  30. package/src/base/turtle.js +1 -1
  31. package/src/element/arc.js +1 -1
  32. package/src/element/button.js +29 -2
  33. package/src/element/checkbox.js +31 -1
  34. package/src/element/comb.js +5 -2
  35. package/src/element/composition.js +127 -19
  36. package/src/element/conic.js +46 -5
  37. package/src/element/input.js +32 -1
  38. package/src/element/locus.js +2 -2
  39. package/src/element/measure.js +9 -4
  40. package/src/element/sector.js +46 -12
  41. package/src/element/slider.js +17 -12
  42. package/src/element/slopetriangle.js +1 -1
  43. package/src/jsxgraph.js +28 -9
  44. package/src/jxg.js +4 -3
  45. package/src/loadjsxgraph.js +3 -2
  46. package/src/math/bst.js +1 -1
  47. package/src/math/clip.js +550 -345
  48. package/src/math/complex.js +1 -1
  49. package/src/math/extrapolate.js +1 -1
  50. package/src/math/geometry.js +155 -126
  51. package/src/math/ia.js +290 -21
  52. package/src/math/math.js +30 -1
  53. package/src/math/metapost.js +1 -1
  54. package/src/math/nlp.js +25 -5
  55. package/src/math/numerics.js +183 -4
  56. package/src/math/plot.js +4 -4
  57. package/src/math/poly.js +1 -1
  58. package/src/math/probfuncs.js +2 -1
  59. package/src/math/qdt.js +68 -62
  60. package/src/math/statistics.js +58 -7
  61. package/src/math/symbolic.js +1 -1
  62. package/src/options.js +377 -114
  63. package/src/parser/ca.js +1297 -1291
  64. package/src/parser/datasource.js +1 -1
  65. package/src/parser/geonext.js +6 -6
  66. package/src/parser/jessiecode.js +275 -79
  67. package/src/parser/jessiescript.js +1 -1
  68. package/src/reader/cinderella.js +1 -1
  69. package/src/reader/file.js +1 -1
  70. package/src/reader/geogebra.js +1 -1
  71. package/src/reader/geonext.js +1 -1
  72. package/src/reader/graph.js +1 -1
  73. package/src/reader/intergeo.js +1 -1
  74. package/src/reader/sketch.js +21 -13
  75. package/src/renderer/abstract.js +21 -6
  76. package/src/renderer/canvas.js +22 -15
  77. package/src/renderer/no.js +11 -4
  78. package/src/renderer/svg.js +76 -53
  79. package/src/renderer/vml.js +36 -32
  80. package/src/server/server.js +1 -1
  81. package/src/utils/base64.js +2 -2
  82. package/src/utils/color.js +148 -3
  83. package/src/utils/dump.js +21 -15
  84. package/src/utils/env.js +63 -104
  85. package/src/utils/event.js +1 -1
  86. package/src/utils/expect.js +1 -1
  87. package/src/utils/type.js +30 -19
  88. package/src/utils/xml.js +1 -1
  89. package/src/utils/zip.js +1 -1
  90. package/CHANGELOG.md +0 -1281
package/src/options.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2008-2021
2
+ Copyright 2008-2022
3
3
  Matthias Ehmann,
4
4
  Michael Gerhaeuser,
5
5
  Carsten Miller,
@@ -213,7 +213,7 @@ define([
213
213
  * axis:true in {@link JXG.JSXGraph#initBoard}.
214
214
  *
215
215
  * @name JXG.Board#defaultAxes
216
- * @type {Object}
216
+ * @type Object
217
217
  * @default {x: {name:'x'}, y: {name: 'y'}}
218
218
  *
219
219
  */
@@ -299,7 +299,7 @@ define([
299
299
  * </ul>
300
300
  *
301
301
  * @name JXG.Board#screenshot
302
- * @type {Object}
302
+ * @type Object
303
303
  */
304
304
  screenshot: {
305
305
  scale: 1.0,
@@ -324,7 +324,9 @@ define([
324
324
  * controls if the icon is shown.
325
325
  * The following attribute(s) can be set:
326
326
  * <ul>
327
- * <li>symbol: Unicode symbol which is shown in the navigation bar. Default: '\u25a1'
327
+ * <li>symbol (String): Unicode symbol which is shown in the navigation bar. Default: '\u25a1'
328
+ * <li>id (String): Id of the HTML element which is brought to full screen or null if the JSXgraph div is taken.
329
+ * It may be an outer div element, e.g. if the old aspect ratio trick is used. Default: null, i.e. use the JSXGraph div.
328
330
  * </ul>
329
331
  *
330
332
  * @example
@@ -355,10 +357,11 @@ define([
355
357
  *
356
358
  * @name JXG.Board#fullscreen
357
359
  * @see JXG.Board#showFullscreen
358
- * @type {Object}
360
+ * @type Object
359
361
  */
360
362
  fullscreen: {
361
- symbol: '\u26f6' //'\u25a1'
363
+ symbol: '\u25a1', // '\u26f6' (not supported by MacOS), // '\u25a1'
364
+ id: null
362
365
  },
363
366
 
364
367
  /**
@@ -543,13 +546,13 @@ define([
543
546
  * factorY: 1.25, // vertical zoom factor (multiplied to {@link JXG.Board#zoomY})
544
547
  * wheel: true, // allow zooming by mouse wheel or
545
548
  * // by pinch-to-toom gesture on touch devices
546
- * needShift: true, // mouse wheel zooming needs pressing of the shift key
547
- * min: 0.001 // minimal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomOut
548
- * max: 1000.0 // maximal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomIn
549
+ * needShift: true, // mouse wheel zooming needs pressing of the shift key
550
+ * min: 0.001, // minimal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomOut
551
+ * max: 1000.0, // maximal values of {@link JXG.Board#zoomX} and {@link JXG.Board#zoomY}, limits zoomIn
549
552
  *
550
- * pinchHorizontal: true // Allow pinch-to-zoom to zoom only horizontal axis
551
- * pinchVertical: true // Allow pinch-to-zoom to zoom only vertical axis
552
- * pinchSensitivity: 7 // Sensitivity (in degrees) for recognizing horizontal or vertical pinch-to-zoom gestures.
553
+ * pinchHorizontal: true, // Allow pinch-to-zoom to zoom only horizontal axis
554
+ * pinchVertical: true, // Allow pinch-to-zoom to zoom only vertical axis
555
+ * pinchSensitivity: 7 // Sensitivity (in degrees) for recognizing horizontal or vertical pinch-to-zoom gestures.
553
556
  * }
554
557
  * </pre>
555
558
  *
@@ -649,11 +652,11 @@ define([
649
652
  * panCtrl: false
650
653
  * }
651
654
  * });
652
- *
655
+ *
653
656
  * })();
654
- *
657
+ *
655
658
  * </script><pre>
656
- *
659
+ *
657
660
  *
658
661
  * @see JXG.Board#keyDownListener
659
662
  * @see JXG.Board#keyFocusInListener
@@ -701,11 +704,11 @@ define([
701
704
  * axis: true,
702
705
  * resize: {enabled: true, throttle: 200}
703
706
  * });
704
- *
707
+ *
705
708
  * })();
706
- *
709
+ *
707
710
  * </script><pre>
708
- *
711
+ *
709
712
  *
710
713
  */
711
714
  resize: {
@@ -750,11 +753,11 @@ define([
750
753
  * axis: true,
751
754
  * moveTarget: document
752
755
  * });
753
- *
756
+ *
754
757
  * })();
755
- *
758
+ *
756
759
  * </script><pre>
757
- *
760
+ *
758
761
  *
759
762
  */
760
763
  moveTarget: null,
@@ -853,7 +856,7 @@ define([
853
856
  * </pre>
854
857
  * These settings are overruled by the CSS class 'JXG_navigation'.
855
858
  * @deprecated
856
- * @type {Object}
859
+ * @type Object
857
860
  * @name JXG.Options#navbar
858
861
  *
859
862
  */
@@ -892,7 +895,7 @@ define([
892
895
  * @see JXG.GeometryElement#highlightStrokeOpacity
893
896
  * @default {@link JXG.Options.elements.color#strokeColor}
894
897
  */
895
- strokeColor: '#0000ff',
898
+ strokeColor: Color.palette.blue,
896
899
 
897
900
  /**
898
901
  * The stroke color of the given geometry element when the user moves the mouse over it.
@@ -904,7 +907,7 @@ define([
904
907
  * @see JXG.GeometryElement#highlightStrokeOpacity
905
908
  * @default {@link JXG.Options.elements.color#highlightStrokeColor}
906
909
  */
907
- highlightStrokeColor: '#C3D9FF',
910
+ highlightStrokeColor: '#c3d9ff',
908
911
 
909
912
  /**
910
913
  * The fill color of this geometry element.
@@ -915,7 +918,7 @@ define([
915
918
  * @see JXG.GeometryElement#highlightFillOpacity
916
919
  * @default {@link JXG.Options.elements.color#fillColor}
917
920
  */
918
- fillColor: 'red',
921
+ fillColor: Color.palette.red,
919
922
 
920
923
  /**
921
924
  * The fill color of the given geometry element when the mouse is pointed over it.
@@ -1447,7 +1450,7 @@ define([
1447
1450
  * This attributes takes either the value 'inherit' or an object of the form:
1448
1451
  * <pre>
1449
1452
  * precision: {
1450
- * touch: 15,
1453
+ * touch: 30,
1451
1454
  * mouse: 4,
1452
1455
  * pen: 4
1453
1456
  * }
@@ -1532,7 +1535,7 @@ define([
1532
1535
  * Attributes for the ticks labels
1533
1536
  *
1534
1537
  * @name Ticks#label
1535
- * @type {Object}
1538
+ * @type Object
1536
1539
  * @default {}
1537
1540
  *
1538
1541
  */
@@ -1585,9 +1588,9 @@ define([
1585
1588
  * }
1586
1589
  * },
1587
1590
  * });
1588
- *
1591
+ *
1589
1592
  * })();
1590
- *
1593
+ *
1591
1594
  * </script><pre>
1592
1595
  *
1593
1596
  * @name Ticks#beautifulScientificTickLabels
@@ -1754,14 +1757,28 @@ define([
1754
1757
 
1755
1758
  /**
1756
1759
  * If a label exceeds {@link Ticks#maxLabelLength} this determines the precision used to shorten the tick label.
1760
+ * Replaced by the digits attribute.
1757
1761
  *
1758
1762
  * @type Number
1759
1763
  * @name Ticks#precision
1760
1764
  * @see Ticks#maxLabelLength
1765
+ * @see Ticks#digits
1766
+ * @deprecated
1761
1767
  * @default 3
1762
1768
  */
1763
1769
  precision: 3,
1764
1770
 
1771
+ /**
1772
+ * If a label exceeds {@link Ticks#maxLabelLength} this determines the number of digits used to shorten the tick label.
1773
+ *
1774
+ * @type Number
1775
+ * @name Ticks#digits
1776
+ * @see Ticks#maxLabelLength
1777
+ * @deprecated
1778
+ * @default 3
1779
+ */
1780
+ digits: 3,
1781
+
1765
1782
  /**
1766
1783
  * The default distance between two ticks. Please be aware that this value does not have
1767
1784
  * to be used if {@link Ticks#insertTicks} is set to true.
@@ -1777,7 +1794,7 @@ define([
1777
1794
  * Tick face for ticks of finite length. By default (face: '|') this is a straight line.
1778
1795
  * Possible other values are '<' and '>'. These faces are used in
1779
1796
  * {@link JXG.Hatch} for hatch marking parallel lines.
1780
- * @type {String}
1797
+ * @type String
1781
1798
  * @name{Ticks#face}
1782
1799
  * @see hatch
1783
1800
  * @default '|'
@@ -1806,7 +1823,7 @@ define([
1806
1823
 
1807
1824
  strokeOpacity: 1,
1808
1825
  strokeWidth: 1,
1809
- strokeColor: 'black',
1826
+ strokeColor: '#000000',
1810
1827
  highlightStrokeColor: '#888888',
1811
1828
  fillColor: 'none',
1812
1829
  highlightFillColor: 'none',
@@ -1846,7 +1863,7 @@ define([
1846
1863
  anchor: 'middle',
1847
1864
  face: '|',
1848
1865
  strokeWidth: 2,
1849
- strokeColor: 'blue',
1866
+ strokeColor: Color.palette.blue,
1850
1867
  ticksDistance: 0.2
1851
1868
  },
1852
1869
 
@@ -1868,12 +1885,12 @@ define([
1868
1885
  * }
1869
1886
  * </pre>
1870
1887
  *
1871
- * @type {Object}
1888
+ * @type Object
1872
1889
  * @name JXG.Options#precision
1873
1890
  * @see JXG.GeometryElement#precision
1874
1891
  */
1875
1892
  precision: {
1876
- touch: 15,
1893
+ touch: 30,
1877
1894
  touchMax: 100,
1878
1895
  mouse: 4,
1879
1896
  pen: 4,
@@ -1908,7 +1925,7 @@ define([
1908
1925
  * trace: 0
1909
1926
  * }
1910
1927
  * </pre>
1911
- * @type {Object}
1928
+ * @type Object
1912
1929
  * @name JXG.Options#layer
1913
1930
  */
1914
1931
  layer: {
@@ -1999,9 +2016,13 @@ define([
1999
2016
  */
2000
2017
  orthoSensitivity: 1.0,
2001
2018
 
2002
- fillColor: '#FF7F00',
2003
- highlightFillColor: '#FF7F00',
2004
- strokeColor: '#FF7F00',
2019
+ fillColor: Color.palette.orange,
2020
+ highlightFillColor: Color.palette.orange,
2021
+ strokeColor: Color.palette.orange,
2022
+ // fillColor: '#ff7f00',
2023
+ // highlightFillColor: '#ff7f00',
2024
+ // strokeColor: '#ff7f00',
2025
+
2005
2026
  fillOpacity: 0.3,
2006
2027
  highlightFillOpacity: 0.3,
2007
2028
 
@@ -2026,7 +2047,7 @@ define([
2026
2047
  dot: {
2027
2048
  visible: false,
2028
2049
  strokeColor: 'none',
2029
- fillColor: 'black',
2050
+ fillColor: '#000000',
2030
2051
  size: 2,
2031
2052
  face: 'o',
2032
2053
  withLabel: false,
@@ -2036,7 +2057,7 @@ define([
2036
2057
  label: {
2037
2058
  position: 'top',
2038
2059
  offset: [0, 0],
2039
- strokeColor: '#0000FF'
2060
+ strokeColor: Color.palette.blue
2040
2061
  },
2041
2062
 
2042
2063
  /**
@@ -2088,8 +2109,8 @@ define([
2088
2109
  lastArrow: false,
2089
2110
  fillColor: 'none',
2090
2111
  highlightFillColor: 'none',
2091
- strokeColor: '#0000ff',
2092
- highlightStrokeColor: '#C3D9FF',
2112
+ strokeColor: Color.palette.blue,
2113
+ highlightStrokeColor: '#c3d9ff',
2093
2114
  useDirection: false,
2094
2115
 
2095
2116
  /**
@@ -2281,7 +2302,7 @@ define([
2281
2302
  * @name Bisectorlines#line1
2282
2303
  */
2283
2304
  line1: { //
2284
- strokeColor: 'black'
2305
+ strokeColor: '#000000'
2285
2306
  },
2286
2307
 
2287
2308
  /**
@@ -2291,12 +2312,48 @@ define([
2291
2312
  * @name Bisectorlines#line2
2292
2313
  */
2293
2314
  line2: { //
2294
- strokeColor: 'black'
2315
+ strokeColor: '#000000'
2295
2316
  }
2296
2317
 
2297
2318
  /**#@-*/
2298
2319
  },
2299
2320
 
2321
+ /* special options for boxplot curves */
2322
+ boxplot: {
2323
+ /**#@+
2324
+ * @visprop
2325
+ */
2326
+
2327
+ /**
2328
+ * Direction of the box plot: 'vertical' or 'horizontal'
2329
+ *
2330
+ * @type String
2331
+ * @name Boxplot#dir
2332
+ * @default: 'vertical'
2333
+ */
2334
+ dir: 'vertical',
2335
+
2336
+ /**
2337
+ * Relative width of the maximum and minimum quantile
2338
+ *
2339
+ * @type Number
2340
+ * @name Boxplot#smallWidth
2341
+ * @default: 0.5
2342
+ */
2343
+ smallWidth: 0.5,
2344
+
2345
+ strokeWidth: 2,
2346
+ strokeColor: Color.palette.blue,
2347
+ fillColor: Color.palette.blue,
2348
+ fillOpacity: 0.2,
2349
+ highlightStrokeWidth: 2,
2350
+ highlightStrokeColor: Color.palette.blue,
2351
+ highlightFillColor: Color.palette.blue,
2352
+ highlightFillOpacity: 0.1
2353
+
2354
+ /**#@-*/
2355
+ },
2356
+
2300
2357
  /* special button options */
2301
2358
  button: {
2302
2359
  /**#@+
@@ -2348,7 +2405,7 @@ define([
2348
2405
  *
2349
2406
  * @name isArrayOfCoordinates
2350
2407
  * @memberOf Cardinalspline.prototype
2351
- * @type {Boolean}
2408
+ * @type Boolean
2352
2409
  * @default false
2353
2410
  */
2354
2411
  isArrayOfCoordinates: false,
@@ -2383,7 +2440,7 @@ define([
2383
2440
  */
2384
2441
 
2385
2442
  chartStyle: 'line',
2386
- colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
2443
+ colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00'],
2387
2444
  highlightcolors: null,
2388
2445
  fillcolor: null,
2389
2446
  highlightonsector: false,
@@ -2448,8 +2505,8 @@ define([
2448
2505
 
2449
2506
  fillColor: 'none',
2450
2507
  highlightFillColor: 'none',
2451
- strokeColor: '#0000ff',
2452
- highlightStrokeColor: '#C3D9FF',
2508
+ strokeColor: Color.palette.blue,
2509
+ highlightStrokeColor: '#c3d9ff',
2453
2510
 
2454
2511
  /**
2455
2512
  * Attributes for center point.
@@ -2461,6 +2518,12 @@ define([
2461
2518
  visible: false,
2462
2519
  withLabel: false,
2463
2520
  fixed: false,
2521
+
2522
+ fillColor: Color.palette.red,
2523
+ strokeColor: Color.palette.red,
2524
+ highlightFillColor: '#c3d9ff',
2525
+ highlightStrokeColor: '#c3d9ff',
2526
+
2464
2527
  name: ''
2465
2528
  },
2466
2529
 
@@ -2471,7 +2534,7 @@ define([
2471
2534
  * @name Circle#center
2472
2535
  */
2473
2536
  point2: {
2474
- visible: true,
2537
+ visible: false,
2475
2538
  withLabel: false,
2476
2539
  fixed: false,
2477
2540
  name: ''
@@ -2497,8 +2560,8 @@ define([
2497
2560
 
2498
2561
  fillColor: 'none',
2499
2562
  highlightFillColor: 'none',
2500
- strokeColor: '#0000ff',
2501
- highlightStrokeColor: '#C3D9FF',
2563
+ strokeColor: Color.palette.blue,
2564
+ highlightStrokeColor: '#c3d9ff',
2502
2565
 
2503
2566
  /**
2504
2567
  * Attributes for center point.
@@ -2510,6 +2573,10 @@ define([
2510
2573
  visible: false,
2511
2574
  fixed: false,
2512
2575
  withLabel: false,
2576
+ fillColor: Color.palette.red,
2577
+ strokeColor: Color.palette.red,
2578
+ highlightFillColor: '#c3d9ff',
2579
+ highlightStrokeColor: '#c3d9ff',
2513
2580
  name: ''
2514
2581
  }
2515
2582
  /**#@-*/
@@ -2522,8 +2589,8 @@ define([
2522
2589
 
2523
2590
  fillColor: 'none',
2524
2591
  highlightFillColor: 'none',
2525
- strokeColor: '#0000ff',
2526
- highlightStrokeColor: '#C3D9FF',
2592
+ strokeColor: Color.palette.blue,
2593
+ highlightStrokeColor: '#c3d9ff',
2527
2594
 
2528
2595
  /**
2529
2596
  * Attributes for center point.
@@ -2547,12 +2614,12 @@ define([
2547
2614
  */
2548
2615
 
2549
2616
  useDirection: true,
2550
- fillColor: '#00FF00',
2551
- highlightFillColor: '#00FF00',
2617
+ fillColor: Color.palette.yellow,
2618
+ highlightFillColor: Color.palette.yellow,
2552
2619
  fillOpacity: 0.3,
2553
2620
  highlightFillOpacity: 0.3,
2554
- strokeColor: '#0000ff',
2555
- highlightStrokeColor: '#C3D9FF',
2621
+ strokeColor: Color.palette.blue,
2622
+ highlightStrokeColor: '#c3d9ff',
2556
2623
 
2557
2624
  /**
2558
2625
  * Attributes for center point.
@@ -2577,8 +2644,8 @@ define([
2577
2644
 
2578
2645
  fillColor: 'none',
2579
2646
  highlightFillColor: 'none',
2580
- strokeColor: '#0000ff',
2581
- highlightStrokeColor: '#C3D9FF',
2647
+ strokeColor: Color.palette.blue,
2648
+ highlightStrokeColor: '#c3d9ff',
2582
2649
 
2583
2650
  /**
2584
2651
  * Attributes for foci points.
@@ -2634,7 +2701,7 @@ define([
2634
2701
  /* special curve options */
2635
2702
  curve: {
2636
2703
  strokeWidth: 1,
2637
- strokeColor: '#0000ff',
2704
+ strokeColor: Color.palette.blue,
2638
2705
  fillColor: 'none',
2639
2706
  fixed: true,
2640
2707
 
@@ -2802,6 +2869,19 @@ define([
2802
2869
  /**#@-*/
2803
2870
  },
2804
2871
 
2872
+ /* special foreignObject options */
2873
+ foreignobject: {
2874
+
2875
+ /**#@+
2876
+ * @visprop
2877
+ */
2878
+ attractors: [],
2879
+ fixed: true,
2880
+ visible: true
2881
+
2882
+ /**#@-*/
2883
+ },
2884
+
2805
2885
  glider: {
2806
2886
  /**#@+
2807
2887
  * @visprop
@@ -2822,8 +2902,8 @@ define([
2822
2902
  hasGrid: false,
2823
2903
  gridX: 1,
2824
2904
  gridY: 1,
2825
- //strokeColor: '#C0C0C0',
2826
- strokeColor: '#C0C0C0',
2905
+ //strokeColor: '#c0c0c0',
2906
+ strokeColor: '#c0c0c0',
2827
2907
  strokeOpacity: 0.5,
2828
2908
  strokeWidth: 1,
2829
2909
  dash: 0, // dashed grids slow down the iPad considerably
@@ -2866,7 +2946,7 @@ define([
2866
2946
 
2867
2947
  frozen: true,
2868
2948
  isLabel: false,
2869
- strokeColor: 'black',
2949
+ strokeColor: '#000000',
2870
2950
  display: 'html',
2871
2951
  anchorX: 'left',
2872
2952
  anchorY: 'middle',
@@ -2925,7 +3005,8 @@ define([
2925
3005
 
2926
3006
  /**
2927
3007
  * Defines together with {@link Image#snapSizeY} the grid the image snaps on to.
2928
- * The image will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3008
+ * The image will only snap on user coordinates which are
3009
+ * integer multiples to snapSizeX in x and snapSizeY in y direction.
2929
3010
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
2930
3011
  * of the default ticks of the default x axes of the board.
2931
3012
  *
@@ -2977,8 +3058,8 @@ define([
2977
3058
 
2978
3059
  fillColor: 'none',
2979
3060
  highlightFillColor: 'none',
2980
- strokeColor: '#0000ff',
2981
- highlightStrokeColor: '#C3D9FF',
3061
+ strokeColor: Color.palette.blue,
3062
+ highlightStrokeColor: '#c3d9ff',
2982
3063
 
2983
3064
  /**
2984
3065
  * Attributes of circle center.
@@ -2990,6 +3071,10 @@ define([
2990
3071
  visible: false,
2991
3072
  fixed: false,
2992
3073
  withLabel: false,
3074
+ fillColor: Color.palette.red,
3075
+ strokeColor: Color.palette.red,
3076
+ highlightFillColor: '#c3d9ff',
3077
+ highlightStrokeColor: '#c3d9ff',
2993
3078
  name: ''
2994
3079
  }
2995
3080
  /**#@-*/
@@ -3000,7 +3085,7 @@ define([
3000
3085
  * @visprop
3001
3086
  */
3002
3087
 
3003
- fillColor: 'red',
3088
+ fillColor: Color.palette.red,
3004
3089
  fillOpacity: 0.2,
3005
3090
  strokeColor: 'none',
3006
3091
 
@@ -3052,9 +3137,9 @@ define([
3052
3137
  fixed: true,
3053
3138
  strokeWidth: 0,
3054
3139
  strokeOpacity: 0,
3055
- fillColor: 'red',
3056
- fillOpacity: 0.4,
3057
- highlightFillColor: 'red',
3140
+ fillColor: Color.palette.red,
3141
+ fillOpacity: 0.3,
3142
+ highlightFillColor: Color.palette.red,
3058
3143
  highlightFillOpacity: 0.2,
3059
3144
 
3060
3145
  /**
@@ -3067,7 +3152,7 @@ define([
3067
3152
  curveLeft: { // Start point
3068
3153
  visible: true,
3069
3154
  withLabel: false,
3070
- color: 'red',
3155
+ color: Color.palette.red,
3071
3156
  fillOpacity: 0.8,
3072
3157
  layer: 9
3073
3158
  },
@@ -3096,7 +3181,7 @@ define([
3096
3181
  curveRight: { // End point
3097
3182
  visible: true,
3098
3183
  withLabel: false,
3099
- color: 'red',
3184
+ color: Color.palette.red,
3100
3185
  fillOpacity: 0.8,
3101
3186
  layer: 9
3102
3187
  },
@@ -3188,10 +3273,10 @@ define([
3188
3273
  */
3189
3274
 
3190
3275
  visible: 'inherit',
3191
- strokeColor: 'black',
3276
+ strokeColor: '#000000',
3192
3277
  strokeOpacity: 1,
3193
3278
  highlightStrokeOpacity: 0.666666,
3194
- highlightStrokeColor: 'black',
3279
+ highlightStrokeColor: '#000000',
3195
3280
 
3196
3281
  fixed: true,
3197
3282
 
@@ -3239,7 +3324,7 @@ define([
3239
3324
  *
3240
3325
  * @name Label#autoPosition
3241
3326
  * @see Label#offset
3242
- * @type {Boolean}
3327
+ * @type Boolean
3243
3328
  * @default false
3244
3329
  *
3245
3330
  * @example
@@ -3301,9 +3386,9 @@ define([
3301
3386
  * (Circular) array of label colors.
3302
3387
  * @name: Legend#colors
3303
3388
  * @type Array
3304
- * @default "['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00']"
3389
+ * @default "['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00']"
3305
3390
  */
3306
- colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
3391
+ colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00'],
3307
3392
 
3308
3393
  /**
3309
3394
  * Height (in px) of one legend entry
@@ -3443,8 +3528,8 @@ define([
3443
3528
 
3444
3529
  fillColor: 'none', // Important for VML on IE
3445
3530
  highlightFillColor: 'none', // Important for VML on IE
3446
- strokeColor: '#0000ff',
3447
- highlightStrokeColor: '#888888',
3531
+ strokeColor: Color.palette.blue,
3532
+ highlightStrokeColor: '#c3d9ff',
3448
3533
  withTicks: false,
3449
3534
 
3450
3535
  /**
@@ -3579,7 +3664,7 @@ define([
3579
3664
  * Not available for VML renderer.
3580
3665
  * [lineCap description]
3581
3666
  * @name Line#lineCap
3582
- * @type {String}
3667
+ * @type String
3583
3668
  * @default 'butt'
3584
3669
  */
3585
3670
  lineCap: 'butt'
@@ -3631,7 +3716,7 @@ define([
3631
3716
  *
3632
3717
  * @name isArrayOfCoordinates
3633
3718
  * @memberOf Metapostspline.prototype
3634
- * @type {Boolean}
3719
+ * @type Boolean
3635
3720
  * @default false
3636
3721
  */
3637
3722
  isArrayOfCoordinates: false,
@@ -3872,11 +3957,22 @@ define([
3872
3957
  */
3873
3958
  sizeUnit: 'screen',
3874
3959
 
3875
- fillColor: '#ff0000',
3876
- highlightFillColor: '#EEEEEE',
3877
3960
  strokeWidth: 2,
3878
- strokeColor: '#ff0000',
3879
- highlightStrokeColor: '#C3D9FF',
3961
+
3962
+ fillColor: Color.palette.red,
3963
+ strokeColor: Color.palette.red,
3964
+ highlightFillColor:'#c3d9ff',
3965
+ highlightStrokeColor: '#c3d9ff',
3966
+ // strokeOpacity: 1.0,
3967
+ // fillOpacity: 1.0,
3968
+ // highlightFillOpacity: 0.5,
3969
+ // highlightStrokeOpacity: 0.5,
3970
+
3971
+ // fillColor: '#ff0000',
3972
+ // highlightFillColor: '#eeeeee',
3973
+ // strokeWidth: 2,
3974
+ // strokeColor: '#ff0000',
3975
+ // highlightStrokeColor: '#c3d9ff',
3880
3976
 
3881
3977
  /**
3882
3978
  * If true, the point size changes on zoom events.
@@ -3972,8 +4068,12 @@ define([
3972
4068
  snatchDistance: 0.0,
3973
4069
 
3974
4070
  /**
3975
- * If set to true, the point will snap to a grid defined by
3976
- * {@link Point#snapSizeX} and {@link Point#snapSizeY}.
4071
+ * If set to true, the point will snap to a grid of integer multiples of
4072
+ * {@link Point#snapSizeX} and {@link Point#snapSizeY} (in user coordinates).
4073
+ * <p>
4074
+ * The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY
4075
+ * (given in user coordinates, not pixels) or are the intersection points
4076
+ * of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
3977
4077
  *
3978
4078
  * @name Point#snapToGrid
3979
4079
  *
@@ -3984,8 +4084,44 @@ define([
3984
4084
  */
3985
4085
  snapToGrid: false,
3986
4086
 
4087
+ /**
4088
+ * If set to true, the point will only snap to (possibly invisibly) grid points
4089
+ * when within {@link Point#attractorDistance} of such a grid point.
4090
+ * <p>
4091
+ * The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY
4092
+ * (given in user coordinates, not pixels) or are the intersection points
4093
+ * of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
4094
+ *
4095
+ * @name Point#attractToGrid
4096
+ *
4097
+ * @see Point#attractorDistance
4098
+ * @see Point#attractorUnit
4099
+ * @see Point#snapToGrid
4100
+ * @see Point#snapSizeX
4101
+ * @see Point#snapSizeY
4102
+ * @type Boolean
4103
+ * @default false
4104
+ *
4105
+ * @example
4106
+ * board.create('point', [3, 3], { attractToGrid: true, attractorDistance: 10, attractorunit: 'screen' });
4107
+ *
4108
+ * </pre><div id="JXG397ab787-cd40-449c-a7e7-a3f7bab1d4f6" class="jxgbox" style="width: 300px; height: 300px;"></div>
4109
+ * <script type="text/javascript">
4110
+ * (function() {
4111
+ * var board = JXG.JSXGraph.initBoard('JXG397ab787-cd40-449c-a7e7-a3f7bab1d4f6',
4112
+ * {boundingbox: [-1, 4, 7,-4], axis: true, showcopyright: false, shownavigation: false});
4113
+ * board.create('point', [3, 3], { attractToGrid: true, attractorDistance: 10, attractorunit: 'screen' });
4114
+ *
4115
+ * })();
4116
+ *
4117
+ * </script><pre>
4118
+ *
4119
+ */
4120
+ attractToGrid: false,
4121
+
3987
4122
  /**
3988
4123
  * Defines together with {@link Point#snapSizeY} the grid the point snaps on to.
4124
+ * It is given in user coordinates, not in pixels.
3989
4125
  * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3990
4126
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3991
4127
  * of the default ticks of the default x axes of the board.
@@ -4002,6 +4138,7 @@ define([
4002
4138
 
4003
4139
  /**
4004
4140
  * Defines together with {@link Point#snapSizeX} the grid the point snaps on to.
4141
+ * It is given in user coordinates, not in pixels.
4005
4142
  * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
4006
4143
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
4007
4144
  * of the default ticks of the default y axes of the board.
@@ -4056,10 +4193,12 @@ define([
4056
4193
  */
4057
4194
  hasInnerPoints: false,
4058
4195
 
4059
- fillColor: '#00FF00',
4060
- highlightFillColor: '#00FF00',
4196
+ fillColor: Color.palette.yellow,
4197
+ highlightFillColor: Color.palette.yellow,
4198
+ // fillColor: '#00ff00',
4199
+ // highlightFillColor: '#00ff00',
4061
4200
  fillOpacity: 0.3,
4062
- highlightFillOpacity: 0.3,
4201
+ highlightFillOpacity: 0.2,
4063
4202
 
4064
4203
  /**
4065
4204
  * Is the polygon bordered by lines?
@@ -4098,8 +4237,8 @@ define([
4098
4237
  layer: 9,
4099
4238
  withLabel: false,
4100
4239
  name: '',
4101
- strokeColor: '#ff0000',
4102
- fillColor: '#ff0000',
4240
+ strokeColor: Color.palette.red,
4241
+ fillColor: Color.palette.red,
4103
4242
  fixed: false,
4104
4243
  visible: 'inherit'
4105
4244
  },
@@ -4200,10 +4339,10 @@ define([
4200
4339
  * @default false
4201
4340
  */
4202
4341
  hasInnerPoints: false,
4203
- fillColor: '#00FF00',
4204
- highlightFillColor: '#00FF00',
4342
+ fillColor: Color.palette.yellow,
4343
+ highlightFillColor: Color.palette.yellow,
4205
4344
  fillOpacity: 0.3,
4206
- highlightFillOpacity: 0.3,
4345
+ highlightFillOpacity: 0.2,
4207
4346
 
4208
4347
  /**
4209
4348
  * Is the polygon bordered by lines?
@@ -4240,8 +4379,8 @@ define([
4240
4379
  vertices: {
4241
4380
  layer: 9,
4242
4381
  withLabel: true,
4243
- strokeColor: '#ff0000',
4244
- fillColor: '#ff0000',
4382
+ strokeColor: Color.palette.red,
4383
+ fillColor: Color.palette.red,
4245
4384
  fixed: false
4246
4385
  },
4247
4386
 
@@ -4266,7 +4405,7 @@ define([
4266
4405
 
4267
4406
  withLabel: false,
4268
4407
  fillOpacity: 0.3,
4269
- fillColor: '#ffff00'
4408
+ fillColor: Color.palette.yellow
4270
4409
 
4271
4410
  /**#@-*/
4272
4411
  },
@@ -4277,8 +4416,11 @@ define([
4277
4416
  * @visprop
4278
4417
  */
4279
4418
 
4280
- fillColor: '#00FF00',
4281
- highlightFillColor: '#00FF00',
4419
+ fillColor: Color.palette.yellow,
4420
+ highlightFillColor: Color.palette.yellow,
4421
+ // fillColor: '#00ff00',
4422
+ // highlightFillColor: '#00ff00',
4423
+
4282
4424
  fillOpacity: 0.3,
4283
4425
  highlightFillOpacity: 0.3,
4284
4426
  highlightOnSector: false,
@@ -4380,6 +4522,10 @@ define([
4380
4522
  visible: false,
4381
4523
  withLabel: false,
4382
4524
  fixed: false,
4525
+ fillColor: Color.palette.red,
4526
+ strokeColor: Color.palette.red,
4527
+ highlightFillColor:'#eeeeee',
4528
+ highlightStrokeColor: Color.palette.red,
4383
4529
  name: ''
4384
4530
  }
4385
4531
 
@@ -4404,13 +4550,27 @@ define([
4404
4550
 
4405
4551
  /**
4406
4552
  * The precision of the slider value displayed in the optional text.
4553
+ * Replaced by the attribute "digits".
4554
+ *
4407
4555
  * @memberOf Slider.prototype
4408
4556
  * @name precision
4409
4557
  * @type Number
4558
+ * @deprecated
4559
+ * @see Slider#digits
4410
4560
  * @default 2
4411
4561
  */
4412
4562
  precision: 2,
4413
4563
 
4564
+ /**
4565
+ * The number of digits of the slider value displayed in the optional text.
4566
+ *
4567
+ * @memberOf Slider.prototype
4568
+ * @name digits
4569
+ * @type Number
4570
+ * @default 2
4571
+ */
4572
+ digits: 2,
4573
+
4414
4574
  firstArrow: false,
4415
4575
  lastArrow: false,
4416
4576
 
@@ -4435,7 +4595,7 @@ define([
4435
4595
  /**
4436
4596
  * If not null, this replaces the part "name = " in the slider label.
4437
4597
  * Possible types: string, number or function.
4438
- * @type {String}
4598
+ * @type String
4439
4599
  * @name suffixLabel
4440
4600
  * @memberOf Slider.prototype
4441
4601
  * @default null
@@ -4447,7 +4607,7 @@ define([
4447
4607
  /**
4448
4608
  * If not null, this is appended to the value in the slider label.
4449
4609
  * Possible types: string, number or function.
4450
- * @type {String}
4610
+ * @type String
4451
4611
  * @name unitLabel
4452
4612
  * @memberOf Slider.prototype
4453
4613
  * @default null
@@ -4459,7 +4619,7 @@ define([
4459
4619
  /**
4460
4620
  * If not null, this is appended to the value and to unitLabel in the slider label.
4461
4621
  * Possible types: string, number or function.
4462
- * @type {String}
4622
+ * @type String
4463
4623
  * @name postLabel
4464
4624
  * @memberOf Slider.prototype
4465
4625
  * @default null
@@ -4546,7 +4706,7 @@ define([
4546
4706
 
4547
4707
  // Label drawing
4548
4708
  drawLabels: false,
4549
- precision: 2,
4709
+ digits: 2,
4550
4710
  includeBoundaries: 1,
4551
4711
  drawZero: true,
4552
4712
  label: {
@@ -4692,9 +4852,9 @@ define([
4692
4852
  * @visprop
4693
4853
  */
4694
4854
 
4695
- fillColor: 'red',
4855
+ fillColor: Color.palette.red,
4696
4856
  fillOpacity: 0.4,
4697
- highlightFillColor: 'red',
4857
+ highlightFillColor: Color.palette.red,
4698
4858
  highlightFillOpacity: 0.3,
4699
4859
 
4700
4860
  borders: {
@@ -4817,13 +4977,26 @@ define([
4817
4977
 
4818
4978
  /**
4819
4979
  * The precision of the tape measure value displayed in the optional text.
4980
+ * Replaced by the attribute digits
4981
+ *
4820
4982
  * @memberOf Tapemeasure.prototype
4821
4983
  * @name precision
4822
4984
  * @type Number
4985
+ * @deprecated
4986
+ * @see Tapemeasure#digits
4823
4987
  * @default 2
4824
4988
  */
4825
4989
  precision: 2,
4826
4990
 
4991
+ /**
4992
+ * The precision of the tape measure value displayed in the optional text.
4993
+ * @memberOf Tapemeasure.prototype
4994
+ * @name precision
4995
+ * @type Number
4996
+ * @default 2
4997
+ */
4998
+ digits: 2,
4999
+
4827
5000
  /**
4828
5001
  * Attributes for first helper point defining the tape measure position.
4829
5002
  *
@@ -4935,11 +5108,11 @@ define([
4935
5108
  * var board = JXG.JSXGraph.initBoard('JXG2da7e972-ac62-416b-a94b-32559c9ec9f9',
4936
5109
  * {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
4937
5110
  * var txt = board.create('text', [2, 2, "hello"], {fontSize: 8, fontUnit: 'vmin'});
4938
- *
5111
+ *
4939
5112
  * })();
4940
- *
5113
+ *
4941
5114
  * </script><pre>
4942
- *
5115
+ *
4943
5116
  */
4944
5117
  fontUnit: 'px',
4945
5118
 
@@ -4987,8 +5160,8 @@ define([
4987
5160
  */
4988
5161
  isLabel: false,
4989
5162
 
4990
- strokeColor: 'black',
4991
- highlightStrokeColor: 'black',
5163
+ strokeColor: '#000000',
5164
+ highlightStrokeColor: '#000000',
4992
5165
  highlightStrokeOpacity: 0.666666,
4993
5166
 
4994
5167
  /**
@@ -5221,7 +5394,7 @@ define([
5221
5394
  *
5222
5395
  * @example
5223
5396
  * // Load MathJax:
5224
- * // <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
5397
+ * // &lt;script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"&lt;&lt;/script&gt;
5225
5398
  *
5226
5399
  * // function and its derivative
5227
5400
  * var f1 = function(x) { return x * x * x; },
@@ -5328,9 +5501,99 @@ define([
5328
5501
  *
5329
5502
  * </script><pre>
5330
5503
  *
5504
+ * @example
5505
+ * var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-1, 10, 11, -2], axis: true});
5506
+ * board.options.text.useMathjax = true;
5507
+ *
5508
+ * a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5509
+ * suffixlabel:'\\(t_1=\\)',
5510
+ * unitLabel: ' \\(\\text{ ms}\\)',
5511
+ * snapWidth:0.01}),
5512
+ *
5513
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5514
+ * text1 = board.create('text', [5, 1, function(){
5515
+ * return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
5516
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
5517
+ *
5518
+ * </pre><div id="JXGf8bd01db-fb6a-4a5c-9e7f-8823f7aa5ac6" class="jxgbox" style="width: 300px; height: 300px;"></div>
5519
+ * <script type="text/javascript">
5520
+ * (function() {
5521
+ * var board = JXG.JSXGraph.initBoard('JXGf8bd01db-fb6a-4a5c-9e7f-8823f7aa5ac6',
5522
+ * {boundingbox: [-1, 10, 11, -2], axis: true, showcopyright: false, shownavigation: false});
5523
+ * board.options.text.useMathjax = true;
5524
+ *
5525
+ * a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5526
+ * suffixlabel:'\\(t_1=\\)',
5527
+ * unitLabel: ' \\(\\text{ ms}\\)',
5528
+ * snapWidth:0.01}),
5529
+ *
5530
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5531
+ * text1 = board.create('text', [5, 1, function(){
5532
+ * return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
5533
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
5534
+ *
5535
+ * })();
5536
+ *
5537
+ * </script><pre>
5538
+ *
5331
5539
  */
5332
5540
  useMathJax: false,
5333
5541
 
5542
+ /**
5543
+ *
5544
+ * If true, KaTeX will be used to render the input string.
5545
+ * For this feature, katex.min.js and katex.min.css have to be included.
5546
+ * <p>
5547
+ * The example below does not work, because there is a conflict with
5548
+ * the MathJax library which is used below.
5549
+ * </p>
5550
+ *
5551
+ * @name useKatex
5552
+ * @memberOf Text.prototype
5553
+ * @default false
5554
+ * @type Boolean
5555
+ *
5556
+ *
5557
+ * @example
5558
+ * JXG.Options.text.useKatex = true;
5559
+ *
5560
+ * const board = JXG.JSXGraph.initBoard('jxgbox', {
5561
+ * boundingbox: [-2, 5, 8, -5], axis:true
5562
+ * });
5563
+ *
5564
+ * var a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5565
+ * suffixlabel:'t_1=',
5566
+ * unitLabel: ' \\text{ ms}',
5567
+ * snapWidth:0.01});
5568
+ *
5569
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5570
+ * text1 = board.create('text', [5, 1, function(){
5571
+ * return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
5572
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
5573
+ *
5574
+ * </pre>
5575
+ * <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.10/dist/katex.min.css" integrity="sha384-0cCFrwW/0bAk1Z/6IMgIyNU3kfTcNirlObr4WjrUU7+hZeD6ravdYJ3kPWSeC31M" crossorigin="anonymous">
5576
+ * <script src="https://cdn.jsdelivr.net/npm/katex@0.13.10/dist/katex.min.js" integrity="sha384-dtFDxK2tSkECx/6302Z4VN2ZRqt6Gis+b1IwCjJPrn0kMYFQT9rbtyQWg5NFWAF7" crossorigin="anonymous"></script>
5577
+ * <div id="JXG497f065c-cfc1-44c3-ba21-5fa581668869" class="jxgbox" style="width: 300px; height: 300px;"></div>
5578
+ * <script type="text/javascript">
5579
+ * (function() {
5580
+ * var board = JXG.JSXGraph.initBoard('JXG497f065c-cfc1-44c3-ba21-5fa581668869',
5581
+ * {boundingbox: [-2, 5, 8, -5], axis: true, showcopyright: false, shownavigation: false});
5582
+ * board.options.useKatex = true;
5583
+ * var a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5584
+ * suffixlabel:'t_1=',
5585
+ * unitLabel: ' \\text{ ms}',
5586
+ * snapWidth:0.01});
5587
+ *
5588
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5589
+ * text1 = board.create('text', [5, 1, function(){
5590
+ * return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
5591
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
5592
+ *
5593
+ * })();
5594
+ *
5595
+ * </script><pre>
5596
+ */
5334
5597
  useKatex: false,
5335
5598
 
5336
5599
  /**
@@ -5508,7 +5771,7 @@ define([
5508
5771
  arrow: {
5509
5772
  strokeWidth: 2,
5510
5773
  withLabel: false,
5511
- strokeColor: '#ff0000',
5774
+ strokeColor: Color.palette.red,
5512
5775
  lastArrow: true
5513
5776
  }
5514
5777
  /**#@-*/
@@ -5520,7 +5783,7 @@ define([
5520
5783
  * It is used in {@link JXG.GeometryElement#setAttribute} and in
5521
5784
  * the constructor {@link JXG.GeometryElement}.
5522
5785
  * Attention: In Options.js abbreviations are not allowed.
5523
- * @type {Object}
5786
+ * @type Object
5524
5787
  * @name JXG.Options#shortcuts
5525
5788
  *
5526
5789
  */