jsxgraph 1.3.1 → 1.4.2

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 +4964 -4627
  6. package/distrib/intergeo.min.js +3 -3
  7. package/distrib/jsxgraph.css +10 -15
  8. package/distrib/jsxgraphcore.js +9 -25
  9. package/distrib/jsxgraphsrc.js +28437 -25331
  10. package/distrib/sketch.min.js +3 -3
  11. package/package.json +11 -22
  12. package/src/base/board.js +555 -427
  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 +33 -11
  17. package/src/base/coords.js +4 -4
  18. package/src/base/coordselement.js +47 -20
  19. package/src/base/curve.js +308 -117
  20. package/src/base/element.js +80 -51
  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 +1 -1
  25. package/src/base/point.js +20 -41
  26. package/src/base/polygon.js +75 -18
  27. package/src/base/text.js +116 -63
  28. package/src/base/ticks.js +35 -12
  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 +27 -6
  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 +109 -128
  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 +393 -115
  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 +378 -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 +25 -17
  75. package/src/renderer/abstract.js +25 -7
  76. package/src/renderer/canvas.js +20 -15
  77. package/src/renderer/no.js +11 -4
  78. package/src/renderer/svg.js +68 -49
  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 +147 -3
  83. package/src/utils/dump.js +20 -14
  84. package/src/utils/env.js +26 -62
  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 -1305
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
  * }
@@ -1485,7 +1488,20 @@ define([
1485
1488
  */
1486
1489
  isLabel: false,
1487
1490
 
1488
-
1491
+ /**
1492
+ * Controls if an element can get the focus with the tab key.
1493
+ * See <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex">descriptiona at MDN</a>.
1494
+ * The additional value null completely disables focus of an element.
1495
+ * The value will be ignored if keyboard control of the board is not enabled or
1496
+ * the element is fixed or not visible.
1497
+ *
1498
+ * @name JXG.GeometryElement#tabindex
1499
+ * @type Number
1500
+ * @default 0
1501
+ * @see JXG.Board#keyboard
1502
+ * @see JXG.GeometryElement#fixed
1503
+ * @see JXG.GeometryElement#visible
1504
+ */
1489
1505
  tabindex: 0
1490
1506
 
1491
1507
  // close the meta tag
@@ -1532,7 +1548,7 @@ define([
1532
1548
  * Attributes for the ticks labels
1533
1549
  *
1534
1550
  * @name Ticks#label
1535
- * @type {Object}
1551
+ * @type Object
1536
1552
  * @default {}
1537
1553
  *
1538
1554
  */
@@ -1585,9 +1601,9 @@ define([
1585
1601
  * }
1586
1602
  * },
1587
1603
  * });
1588
- *
1604
+ *
1589
1605
  * })();
1590
- *
1606
+ *
1591
1607
  * </script><pre>
1592
1608
  *
1593
1609
  * @name Ticks#beautifulScientificTickLabels
@@ -1754,14 +1770,28 @@ define([
1754
1770
 
1755
1771
  /**
1756
1772
  * If a label exceeds {@link Ticks#maxLabelLength} this determines the precision used to shorten the tick label.
1773
+ * Replaced by the digits attribute.
1757
1774
  *
1758
1775
  * @type Number
1759
1776
  * @name Ticks#precision
1760
1777
  * @see Ticks#maxLabelLength
1778
+ * @see Ticks#digits
1779
+ * @deprecated
1761
1780
  * @default 3
1762
1781
  */
1763
1782
  precision: 3,
1764
1783
 
1784
+ /**
1785
+ * If a label exceeds {@link Ticks#maxLabelLength} this determines the number of digits used to shorten the tick label.
1786
+ *
1787
+ * @type Number
1788
+ * @name Ticks#digits
1789
+ * @see Ticks#maxLabelLength
1790
+ * @deprecated
1791
+ * @default 3
1792
+ */
1793
+ digits: 3,
1794
+
1765
1795
  /**
1766
1796
  * The default distance between two ticks. Please be aware that this value does not have
1767
1797
  * to be used if {@link Ticks#insertTicks} is set to true.
@@ -1777,7 +1807,7 @@ define([
1777
1807
  * Tick face for ticks of finite length. By default (face: '|') this is a straight line.
1778
1808
  * Possible other values are '<' and '>'. These faces are used in
1779
1809
  * {@link JXG.Hatch} for hatch marking parallel lines.
1780
- * @type {String}
1810
+ * @type String
1781
1811
  * @name{Ticks#face}
1782
1812
  * @see hatch
1783
1813
  * @default '|'
@@ -1806,7 +1836,7 @@ define([
1806
1836
 
1807
1837
  strokeOpacity: 1,
1808
1838
  strokeWidth: 1,
1809
- strokeColor: 'black',
1839
+ strokeColor: '#000000',
1810
1840
  highlightStrokeColor: '#888888',
1811
1841
  fillColor: 'none',
1812
1842
  highlightFillColor: 'none',
@@ -1846,7 +1876,7 @@ define([
1846
1876
  anchor: 'middle',
1847
1877
  face: '|',
1848
1878
  strokeWidth: 2,
1849
- strokeColor: 'blue',
1879
+ strokeColor: Color.palette.blue,
1850
1880
  ticksDistance: 0.2
1851
1881
  },
1852
1882
 
@@ -1868,12 +1898,12 @@ define([
1868
1898
  * }
1869
1899
  * </pre>
1870
1900
  *
1871
- * @type {Object}
1901
+ * @type Object
1872
1902
  * @name JXG.Options#precision
1873
1903
  * @see JXG.GeometryElement#precision
1874
1904
  */
1875
1905
  precision: {
1876
- touch: 15,
1906
+ touch: 30,
1877
1907
  touchMax: 100,
1878
1908
  mouse: 4,
1879
1909
  pen: 4,
@@ -1908,7 +1938,7 @@ define([
1908
1938
  * trace: 0
1909
1939
  * }
1910
1940
  * </pre>
1911
- * @type {Object}
1941
+ * @type Object
1912
1942
  * @name JXG.Options#layer
1913
1943
  */
1914
1944
  layer: {
@@ -1999,9 +2029,13 @@ define([
1999
2029
  */
2000
2030
  orthoSensitivity: 1.0,
2001
2031
 
2002
- fillColor: '#FF7F00',
2003
- highlightFillColor: '#FF7F00',
2004
- strokeColor: '#FF7F00',
2032
+ fillColor: Color.palette.orange,
2033
+ highlightFillColor: Color.palette.orange,
2034
+ strokeColor: Color.palette.orange,
2035
+ // fillColor: '#ff7f00',
2036
+ // highlightFillColor: '#ff7f00',
2037
+ // strokeColor: '#ff7f00',
2038
+
2005
2039
  fillOpacity: 0.3,
2006
2040
  highlightFillOpacity: 0.3,
2007
2041
 
@@ -2026,7 +2060,7 @@ define([
2026
2060
  dot: {
2027
2061
  visible: false,
2028
2062
  strokeColor: 'none',
2029
- fillColor: 'black',
2063
+ fillColor: '#000000',
2030
2064
  size: 2,
2031
2065
  face: 'o',
2032
2066
  withLabel: false,
@@ -2036,7 +2070,7 @@ define([
2036
2070
  label: {
2037
2071
  position: 'top',
2038
2072
  offset: [0, 0],
2039
- strokeColor: '#0000FF'
2073
+ strokeColor: Color.palette.blue
2040
2074
  },
2041
2075
 
2042
2076
  /**
@@ -2088,8 +2122,8 @@ define([
2088
2122
  lastArrow: false,
2089
2123
  fillColor: 'none',
2090
2124
  highlightFillColor: 'none',
2091
- strokeColor: '#0000ff',
2092
- highlightStrokeColor: '#C3D9FF',
2125
+ strokeColor: Color.palette.blue,
2126
+ highlightStrokeColor: '#c3d9ff',
2093
2127
  useDirection: false,
2094
2128
 
2095
2129
  /**
@@ -2281,7 +2315,7 @@ define([
2281
2315
  * @name Bisectorlines#line1
2282
2316
  */
2283
2317
  line1: { //
2284
- strokeColor: 'black'
2318
+ strokeColor: '#000000'
2285
2319
  },
2286
2320
 
2287
2321
  /**
@@ -2291,12 +2325,48 @@ define([
2291
2325
  * @name Bisectorlines#line2
2292
2326
  */
2293
2327
  line2: { //
2294
- strokeColor: 'black'
2328
+ strokeColor: '#000000'
2295
2329
  }
2296
2330
 
2297
2331
  /**#@-*/
2298
2332
  },
2299
2333
 
2334
+ /* special options for boxplot curves */
2335
+ boxplot: {
2336
+ /**#@+
2337
+ * @visprop
2338
+ */
2339
+
2340
+ /**
2341
+ * Direction of the box plot: 'vertical' or 'horizontal'
2342
+ *
2343
+ * @type String
2344
+ * @name Boxplot#dir
2345
+ * @default: 'vertical'
2346
+ */
2347
+ dir: 'vertical',
2348
+
2349
+ /**
2350
+ * Relative width of the maximum and minimum quantile
2351
+ *
2352
+ * @type Number
2353
+ * @name Boxplot#smallWidth
2354
+ * @default: 0.5
2355
+ */
2356
+ smallWidth: 0.5,
2357
+
2358
+ strokeWidth: 2,
2359
+ strokeColor: Color.palette.blue,
2360
+ fillColor: Color.palette.blue,
2361
+ fillOpacity: 0.2,
2362
+ highlightStrokeWidth: 2,
2363
+ highlightStrokeColor: Color.palette.blue,
2364
+ highlightFillColor: Color.palette.blue,
2365
+ highlightFillOpacity: 0.1
2366
+
2367
+ /**#@-*/
2368
+ },
2369
+
2300
2370
  /* special button options */
2301
2371
  button: {
2302
2372
  /**#@+
@@ -2348,7 +2418,7 @@ define([
2348
2418
  *
2349
2419
  * @name isArrayOfCoordinates
2350
2420
  * @memberOf Cardinalspline.prototype
2351
- * @type {Boolean}
2421
+ * @type Boolean
2352
2422
  * @default false
2353
2423
  */
2354
2424
  isArrayOfCoordinates: false,
@@ -2383,7 +2453,7 @@ define([
2383
2453
  */
2384
2454
 
2385
2455
  chartStyle: 'line',
2386
- colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
2456
+ colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00'],
2387
2457
  highlightcolors: null,
2388
2458
  fillcolor: null,
2389
2459
  highlightonsector: false,
@@ -2448,8 +2518,8 @@ define([
2448
2518
 
2449
2519
  fillColor: 'none',
2450
2520
  highlightFillColor: 'none',
2451
- strokeColor: '#0000ff',
2452
- highlightStrokeColor: '#C3D9FF',
2521
+ strokeColor: Color.palette.blue,
2522
+ highlightStrokeColor: '#c3d9ff',
2453
2523
 
2454
2524
  /**
2455
2525
  * Attributes for center point.
@@ -2461,6 +2531,12 @@ define([
2461
2531
  visible: false,
2462
2532
  withLabel: false,
2463
2533
  fixed: false,
2534
+
2535
+ fillColor: Color.palette.red,
2536
+ strokeColor: Color.palette.red,
2537
+ highlightFillColor: '#c3d9ff',
2538
+ highlightStrokeColor: '#c3d9ff',
2539
+
2464
2540
  name: ''
2465
2541
  },
2466
2542
 
@@ -2471,7 +2547,7 @@ define([
2471
2547
  * @name Circle#center
2472
2548
  */
2473
2549
  point2: {
2474
- visible: true,
2550
+ visible: false,
2475
2551
  withLabel: false,
2476
2552
  fixed: false,
2477
2553
  name: ''
@@ -2497,8 +2573,8 @@ define([
2497
2573
 
2498
2574
  fillColor: 'none',
2499
2575
  highlightFillColor: 'none',
2500
- strokeColor: '#0000ff',
2501
- highlightStrokeColor: '#C3D9FF',
2576
+ strokeColor: Color.palette.blue,
2577
+ highlightStrokeColor: '#c3d9ff',
2502
2578
 
2503
2579
  /**
2504
2580
  * Attributes for center point.
@@ -2510,6 +2586,10 @@ define([
2510
2586
  visible: false,
2511
2587
  fixed: false,
2512
2588
  withLabel: false,
2589
+ fillColor: Color.palette.red,
2590
+ strokeColor: Color.palette.red,
2591
+ highlightFillColor: '#c3d9ff',
2592
+ highlightStrokeColor: '#c3d9ff',
2513
2593
  name: ''
2514
2594
  }
2515
2595
  /**#@-*/
@@ -2522,8 +2602,8 @@ define([
2522
2602
 
2523
2603
  fillColor: 'none',
2524
2604
  highlightFillColor: 'none',
2525
- strokeColor: '#0000ff',
2526
- highlightStrokeColor: '#C3D9FF',
2605
+ strokeColor: Color.palette.blue,
2606
+ highlightStrokeColor: '#c3d9ff',
2527
2607
 
2528
2608
  /**
2529
2609
  * Attributes for center point.
@@ -2547,12 +2627,12 @@ define([
2547
2627
  */
2548
2628
 
2549
2629
  useDirection: true,
2550
- fillColor: '#00FF00',
2551
- highlightFillColor: '#00FF00',
2630
+ fillColor: Color.palette.yellow,
2631
+ highlightFillColor: Color.palette.yellow,
2552
2632
  fillOpacity: 0.3,
2553
2633
  highlightFillOpacity: 0.3,
2554
- strokeColor: '#0000ff',
2555
- highlightStrokeColor: '#C3D9FF',
2634
+ strokeColor: Color.palette.blue,
2635
+ highlightStrokeColor: '#c3d9ff',
2556
2636
 
2557
2637
  /**
2558
2638
  * Attributes for center point.
@@ -2577,8 +2657,8 @@ define([
2577
2657
 
2578
2658
  fillColor: 'none',
2579
2659
  highlightFillColor: 'none',
2580
- strokeColor: '#0000ff',
2581
- highlightStrokeColor: '#C3D9FF',
2660
+ strokeColor: Color.palette.blue,
2661
+ highlightStrokeColor: '#c3d9ff',
2582
2662
 
2583
2663
  /**
2584
2664
  * Attributes for foci points.
@@ -2634,7 +2714,7 @@ define([
2634
2714
  /* special curve options */
2635
2715
  curve: {
2636
2716
  strokeWidth: 1,
2637
- strokeColor: '#0000ff',
2717
+ strokeColor: Color.palette.blue,
2638
2718
  fillColor: 'none',
2639
2719
  fixed: true,
2640
2720
 
@@ -2802,6 +2882,19 @@ define([
2802
2882
  /**#@-*/
2803
2883
  },
2804
2884
 
2885
+ /* special foreignObject options */
2886
+ foreignobject: {
2887
+
2888
+ /**#@+
2889
+ * @visprop
2890
+ */
2891
+ attractors: [],
2892
+ fixed: true,
2893
+ visible: true
2894
+
2895
+ /**#@-*/
2896
+ },
2897
+
2805
2898
  glider: {
2806
2899
  /**#@+
2807
2900
  * @visprop
@@ -2822,8 +2915,8 @@ define([
2822
2915
  hasGrid: false,
2823
2916
  gridX: 1,
2824
2917
  gridY: 1,
2825
- //strokeColor: '#C0C0C0',
2826
- strokeColor: '#C0C0C0',
2918
+ //strokeColor: '#c0c0c0',
2919
+ strokeColor: '#c0c0c0',
2827
2920
  strokeOpacity: 0.5,
2828
2921
  strokeWidth: 1,
2829
2922
  dash: 0, // dashed grids slow down the iPad considerably
@@ -2866,7 +2959,7 @@ define([
2866
2959
 
2867
2960
  frozen: true,
2868
2961
  isLabel: false,
2869
- strokeColor: 'black',
2962
+ strokeColor: '#000000',
2870
2963
  display: 'html',
2871
2964
  anchorX: 'left',
2872
2965
  anchorY: 'middle',
@@ -2925,7 +3018,8 @@ define([
2925
3018
 
2926
3019
  /**
2927
3020
  * 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.
3021
+ * The image will only snap on user coordinates which are
3022
+ * integer multiples to snapSizeX in x and snapSizeY in y direction.
2929
3023
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
2930
3024
  * of the default ticks of the default x axes of the board.
2931
3025
  *
@@ -2977,8 +3071,8 @@ define([
2977
3071
 
2978
3072
  fillColor: 'none',
2979
3073
  highlightFillColor: 'none',
2980
- strokeColor: '#0000ff',
2981
- highlightStrokeColor: '#C3D9FF',
3074
+ strokeColor: Color.palette.blue,
3075
+ highlightStrokeColor: '#c3d9ff',
2982
3076
 
2983
3077
  /**
2984
3078
  * Attributes of circle center.
@@ -2990,6 +3084,10 @@ define([
2990
3084
  visible: false,
2991
3085
  fixed: false,
2992
3086
  withLabel: false,
3087
+ fillColor: Color.palette.red,
3088
+ strokeColor: Color.palette.red,
3089
+ highlightFillColor: '#c3d9ff',
3090
+ highlightStrokeColor: '#c3d9ff',
2993
3091
  name: ''
2994
3092
  }
2995
3093
  /**#@-*/
@@ -3000,7 +3098,7 @@ define([
3000
3098
  * @visprop
3001
3099
  */
3002
3100
 
3003
- fillColor: 'red',
3101
+ fillColor: Color.palette.red,
3004
3102
  fillOpacity: 0.2,
3005
3103
  strokeColor: 'none',
3006
3104
 
@@ -3052,9 +3150,9 @@ define([
3052
3150
  fixed: true,
3053
3151
  strokeWidth: 0,
3054
3152
  strokeOpacity: 0,
3055
- fillColor: 'red',
3056
- fillOpacity: 0.4,
3057
- highlightFillColor: 'red',
3153
+ fillColor: Color.palette.red,
3154
+ fillOpacity: 0.3,
3155
+ highlightFillColor: Color.palette.red,
3058
3156
  highlightFillOpacity: 0.2,
3059
3157
 
3060
3158
  /**
@@ -3067,7 +3165,7 @@ define([
3067
3165
  curveLeft: { // Start point
3068
3166
  visible: true,
3069
3167
  withLabel: false,
3070
- color: 'red',
3168
+ color: Color.palette.red,
3071
3169
  fillOpacity: 0.8,
3072
3170
  layer: 9
3073
3171
  },
@@ -3096,7 +3194,7 @@ define([
3096
3194
  curveRight: { // End point
3097
3195
  visible: true,
3098
3196
  withLabel: false,
3099
- color: 'red',
3197
+ color: Color.palette.red,
3100
3198
  fillOpacity: 0.8,
3101
3199
  layer: 9
3102
3200
  },
@@ -3188,10 +3286,10 @@ define([
3188
3286
  */
3189
3287
 
3190
3288
  visible: 'inherit',
3191
- strokeColor: 'black',
3289
+ strokeColor: '#000000',
3192
3290
  strokeOpacity: 1,
3193
3291
  highlightStrokeOpacity: 0.666666,
3194
- highlightStrokeColor: 'black',
3292
+ highlightStrokeColor: '#000000',
3195
3293
 
3196
3294
  fixed: true,
3197
3295
 
@@ -3239,7 +3337,7 @@ define([
3239
3337
  *
3240
3338
  * @name Label#autoPosition
3241
3339
  * @see Label#offset
3242
- * @type {Boolean}
3340
+ * @type Boolean
3243
3341
  * @default false
3244
3342
  *
3245
3343
  * @example
@@ -3301,9 +3399,9 @@ define([
3301
3399
  * (Circular) array of label colors.
3302
3400
  * @name: Legend#colors
3303
3401
  * @type Array
3304
- * @default "['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00']"
3402
+ * @default "['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00']"
3305
3403
  */
3306
- colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#C3D9FF', '#4096EE', '#008C00'],
3404
+ colors: ['#B02B2C', '#3F4C6B', '#C79810', '#D15600', '#FFFF88', '#c3d9ff', '#4096EE', '#008C00'],
3307
3405
 
3308
3406
  /**
3309
3407
  * Height (in px) of one legend entry
@@ -3443,8 +3541,8 @@ define([
3443
3541
 
3444
3542
  fillColor: 'none', // Important for VML on IE
3445
3543
  highlightFillColor: 'none', // Important for VML on IE
3446
- strokeColor: '#0000ff',
3447
- highlightStrokeColor: '#888888',
3544
+ strokeColor: Color.palette.blue,
3545
+ highlightStrokeColor: '#c3d9ff',
3448
3546
  withTicks: false,
3449
3547
 
3450
3548
  /**
@@ -3579,7 +3677,7 @@ define([
3579
3677
  * Not available for VML renderer.
3580
3678
  * [lineCap description]
3581
3679
  * @name Line#lineCap
3582
- * @type {String}
3680
+ * @type String
3583
3681
  * @default 'butt'
3584
3682
  */
3585
3683
  lineCap: 'butt'
@@ -3631,7 +3729,7 @@ define([
3631
3729
  *
3632
3730
  * @name isArrayOfCoordinates
3633
3731
  * @memberOf Metapostspline.prototype
3634
- * @type {Boolean}
3732
+ * @type Boolean
3635
3733
  * @default false
3636
3734
  */
3637
3735
  isArrayOfCoordinates: false,
@@ -3872,11 +3970,22 @@ define([
3872
3970
  */
3873
3971
  sizeUnit: 'screen',
3874
3972
 
3875
- fillColor: '#ff0000',
3876
- highlightFillColor: '#EEEEEE',
3877
3973
  strokeWidth: 2,
3878
- strokeColor: '#ff0000',
3879
- highlightStrokeColor: '#C3D9FF',
3974
+
3975
+ fillColor: Color.palette.red,
3976
+ strokeColor: Color.palette.red,
3977
+ highlightFillColor:'#c3d9ff',
3978
+ highlightStrokeColor: '#c3d9ff',
3979
+ // strokeOpacity: 1.0,
3980
+ // fillOpacity: 1.0,
3981
+ // highlightFillOpacity: 0.5,
3982
+ // highlightStrokeOpacity: 0.5,
3983
+
3984
+ // fillColor: '#ff0000',
3985
+ // highlightFillColor: '#eeeeee',
3986
+ // strokeWidth: 2,
3987
+ // strokeColor: '#ff0000',
3988
+ // highlightStrokeColor: '#c3d9ff',
3880
3989
 
3881
3990
  /**
3882
3991
  * If true, the point size changes on zoom events.
@@ -3972,8 +4081,12 @@ define([
3972
4081
  snatchDistance: 0.0,
3973
4082
 
3974
4083
  /**
3975
- * If set to true, the point will snap to a grid defined by
3976
- * {@link Point#snapSizeX} and {@link Point#snapSizeY}.
4084
+ * If set to true, the point will snap to a grid of integer multiples of
4085
+ * {@link Point#snapSizeX} and {@link Point#snapSizeY} (in user coordinates).
4086
+ * <p>
4087
+ * The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY
4088
+ * (given in user coordinates, not pixels) or are the intersection points
4089
+ * of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
3977
4090
  *
3978
4091
  * @name Point#snapToGrid
3979
4092
  *
@@ -3984,8 +4097,44 @@ define([
3984
4097
  */
3985
4098
  snapToGrid: false,
3986
4099
 
4100
+ /**
4101
+ * If set to true, the point will only snap to (possibly invisibly) grid points
4102
+ * when within {@link Point#attractorDistance} of such a grid point.
4103
+ * <p>
4104
+ * The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY
4105
+ * (given in user coordinates, not pixels) or are the intersection points
4106
+ * of the major ticks of the boards default axes in case that snapSizeX, snapSizeY are negative.
4107
+ *
4108
+ * @name Point#attractToGrid
4109
+ *
4110
+ * @see Point#attractorDistance
4111
+ * @see Point#attractorUnit
4112
+ * @see Point#snapToGrid
4113
+ * @see Point#snapSizeX
4114
+ * @see Point#snapSizeY
4115
+ * @type Boolean
4116
+ * @default false
4117
+ *
4118
+ * @example
4119
+ * board.create('point', [3, 3], { attractToGrid: true, attractorDistance: 10, attractorunit: 'screen' });
4120
+ *
4121
+ * </pre><div id="JXG397ab787-cd40-449c-a7e7-a3f7bab1d4f6" class="jxgbox" style="width: 300px; height: 300px;"></div>
4122
+ * <script type="text/javascript">
4123
+ * (function() {
4124
+ * var board = JXG.JSXGraph.initBoard('JXG397ab787-cd40-449c-a7e7-a3f7bab1d4f6',
4125
+ * {boundingbox: [-1, 4, 7,-4], axis: true, showcopyright: false, shownavigation: false});
4126
+ * board.create('point', [3, 3], { attractToGrid: true, attractorDistance: 10, attractorunit: 'screen' });
4127
+ *
4128
+ * })();
4129
+ *
4130
+ * </script><pre>
4131
+ *
4132
+ */
4133
+ attractToGrid: false,
4134
+
3987
4135
  /**
3988
4136
  * Defines together with {@link Point#snapSizeY} the grid the point snaps on to.
4137
+ * It is given in user coordinates, not in pixels.
3989
4138
  * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
3990
4139
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
3991
4140
  * of the default ticks of the default x axes of the board.
@@ -4002,6 +4151,7 @@ define([
4002
4151
 
4003
4152
  /**
4004
4153
  * Defines together with {@link Point#snapSizeX} the grid the point snaps on to.
4154
+ * It is given in user coordinates, not in pixels.
4005
4155
  * The point will only snap on integer multiples to snapSizeX in x and snapSizeY in y direction.
4006
4156
  * If this value is equal to or less than <tt>0</tt>, it will use the grid displayed by the major ticks
4007
4157
  * of the default ticks of the default y axes of the board.
@@ -4056,10 +4206,12 @@ define([
4056
4206
  */
4057
4207
  hasInnerPoints: false,
4058
4208
 
4059
- fillColor: '#00FF00',
4060
- highlightFillColor: '#00FF00',
4209
+ fillColor: Color.palette.yellow,
4210
+ highlightFillColor: Color.palette.yellow,
4211
+ // fillColor: '#00ff00',
4212
+ // highlightFillColor: '#00ff00',
4061
4213
  fillOpacity: 0.3,
4062
- highlightFillOpacity: 0.3,
4214
+ highlightFillOpacity: 0.2,
4063
4215
 
4064
4216
  /**
4065
4217
  * Is the polygon bordered by lines?
@@ -4098,8 +4250,8 @@ define([
4098
4250
  layer: 9,
4099
4251
  withLabel: false,
4100
4252
  name: '',
4101
- strokeColor: '#ff0000',
4102
- fillColor: '#ff0000',
4253
+ strokeColor: Color.palette.red,
4254
+ fillColor: Color.palette.red,
4103
4255
  fixed: false,
4104
4256
  visible: 'inherit'
4105
4257
  },
@@ -4200,10 +4352,10 @@ define([
4200
4352
  * @default false
4201
4353
  */
4202
4354
  hasInnerPoints: false,
4203
- fillColor: '#00FF00',
4204
- highlightFillColor: '#00FF00',
4355
+ fillColor: Color.palette.yellow,
4356
+ highlightFillColor: Color.palette.yellow,
4205
4357
  fillOpacity: 0.3,
4206
- highlightFillOpacity: 0.3,
4358
+ highlightFillOpacity: 0.2,
4207
4359
 
4208
4360
  /**
4209
4361
  * Is the polygon bordered by lines?
@@ -4240,8 +4392,8 @@ define([
4240
4392
  vertices: {
4241
4393
  layer: 9,
4242
4394
  withLabel: true,
4243
- strokeColor: '#ff0000',
4244
- fillColor: '#ff0000',
4395
+ strokeColor: Color.palette.red,
4396
+ fillColor: Color.palette.red,
4245
4397
  fixed: false
4246
4398
  },
4247
4399
 
@@ -4266,7 +4418,7 @@ define([
4266
4418
 
4267
4419
  withLabel: false,
4268
4420
  fillOpacity: 0.3,
4269
- fillColor: '#ffff00'
4421
+ fillColor: Color.palette.yellow
4270
4422
 
4271
4423
  /**#@-*/
4272
4424
  },
@@ -4277,8 +4429,11 @@ define([
4277
4429
  * @visprop
4278
4430
  */
4279
4431
 
4280
- fillColor: '#00FF00',
4281
- highlightFillColor: '#00FF00',
4432
+ fillColor: Color.palette.yellow,
4433
+ highlightFillColor: Color.palette.yellow,
4434
+ // fillColor: '#00ff00',
4435
+ // highlightFillColor: '#00ff00',
4436
+
4282
4437
  fillOpacity: 0.3,
4283
4438
  highlightFillOpacity: 0.3,
4284
4439
  highlightOnSector: false,
@@ -4380,6 +4535,10 @@ define([
4380
4535
  visible: false,
4381
4536
  withLabel: false,
4382
4537
  fixed: false,
4538
+ fillColor: Color.palette.red,
4539
+ strokeColor: Color.palette.red,
4540
+ highlightFillColor:'#eeeeee',
4541
+ highlightStrokeColor: Color.palette.red,
4383
4542
  name: ''
4384
4543
  }
4385
4544
 
@@ -4404,13 +4563,27 @@ define([
4404
4563
 
4405
4564
  /**
4406
4565
  * The precision of the slider value displayed in the optional text.
4566
+ * Replaced by the attribute "digits".
4567
+ *
4407
4568
  * @memberOf Slider.prototype
4408
4569
  * @name precision
4409
4570
  * @type Number
4571
+ * @deprecated
4572
+ * @see Slider#digits
4410
4573
  * @default 2
4411
4574
  */
4412
4575
  precision: 2,
4413
4576
 
4577
+ /**
4578
+ * The number of digits of the slider value displayed in the optional text.
4579
+ *
4580
+ * @memberOf Slider.prototype
4581
+ * @name digits
4582
+ * @type Number
4583
+ * @default 2
4584
+ */
4585
+ digits: 2,
4586
+
4414
4587
  firstArrow: false,
4415
4588
  lastArrow: false,
4416
4589
 
@@ -4435,7 +4608,7 @@ define([
4435
4608
  /**
4436
4609
  * If not null, this replaces the part "name = " in the slider label.
4437
4610
  * Possible types: string, number or function.
4438
- * @type {String}
4611
+ * @type String
4439
4612
  * @name suffixLabel
4440
4613
  * @memberOf Slider.prototype
4441
4614
  * @default null
@@ -4447,7 +4620,7 @@ define([
4447
4620
  /**
4448
4621
  * If not null, this is appended to the value in the slider label.
4449
4622
  * Possible types: string, number or function.
4450
- * @type {String}
4623
+ * @type String
4451
4624
  * @name unitLabel
4452
4625
  * @memberOf Slider.prototype
4453
4626
  * @default null
@@ -4459,7 +4632,7 @@ define([
4459
4632
  /**
4460
4633
  * If not null, this is appended to the value and to unitLabel in the slider label.
4461
4634
  * Possible types: string, number or function.
4462
- * @type {String}
4635
+ * @type String
4463
4636
  * @name postLabel
4464
4637
  * @memberOf Slider.prototype
4465
4638
  * @default null
@@ -4528,6 +4701,7 @@ define([
4528
4701
  visible: 'inherit',
4529
4702
  fixed: true,
4530
4703
  scalable: false,
4704
+ tabindex: null,
4531
4705
  name: '',
4532
4706
  strokeWidth: 1,
4533
4707
  strokeColor: '#000000',
@@ -4546,7 +4720,7 @@ define([
4546
4720
 
4547
4721
  // Label drawing
4548
4722
  drawLabels: false,
4549
- precision: 2,
4723
+ digits: 2,
4550
4724
  includeBoundaries: 1,
4551
4725
  drawZero: true,
4552
4726
  label: {
@@ -4577,6 +4751,7 @@ define([
4577
4751
  strokeWidth: 3,
4578
4752
  visible: 'inherit',
4579
4753
  fixed: true,
4754
+ tabindex: null,
4580
4755
  name: '',
4581
4756
  strokeColor: '#000000',
4582
4757
  highlightStrokeColor: '#888888'
@@ -4692,9 +4867,9 @@ define([
4692
4867
  * @visprop
4693
4868
  */
4694
4869
 
4695
- fillColor: 'red',
4870
+ fillColor: Color.palette.red,
4696
4871
  fillOpacity: 0.4,
4697
- highlightFillColor: 'red',
4872
+ highlightFillColor: Color.palette.red,
4698
4873
  highlightFillOpacity: 0.3,
4699
4874
 
4700
4875
  borders: {
@@ -4817,13 +4992,26 @@ define([
4817
4992
 
4818
4993
  /**
4819
4994
  * The precision of the tape measure value displayed in the optional text.
4995
+ * Replaced by the attribute digits
4996
+ *
4820
4997
  * @memberOf Tapemeasure.prototype
4821
4998
  * @name precision
4822
4999
  * @type Number
5000
+ * @deprecated
5001
+ * @see Tapemeasure#digits
4823
5002
  * @default 2
4824
5003
  */
4825
5004
  precision: 2,
4826
5005
 
5006
+ /**
5007
+ * The precision of the tape measure value displayed in the optional text.
5008
+ * @memberOf Tapemeasure.prototype
5009
+ * @name precision
5010
+ * @type Number
5011
+ * @default 2
5012
+ */
5013
+ digits: 2,
5014
+
4827
5015
  /**
4828
5016
  * Attributes for first helper point defining the tape measure position.
4829
5017
  *
@@ -4935,11 +5123,11 @@ define([
4935
5123
  * var board = JXG.JSXGraph.initBoard('JXG2da7e972-ac62-416b-a94b-32559c9ec9f9',
4936
5124
  * {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
4937
5125
  * var txt = board.create('text', [2, 2, "hello"], {fontSize: 8, fontUnit: 'vmin'});
4938
- *
5126
+ *
4939
5127
  * })();
4940
- *
5128
+ *
4941
5129
  * </script><pre>
4942
- *
5130
+ *
4943
5131
  */
4944
5132
  fontUnit: 'px',
4945
5133
 
@@ -4987,8 +5175,8 @@ define([
4987
5175
  */
4988
5176
  isLabel: false,
4989
5177
 
4990
- strokeColor: 'black',
4991
- highlightStrokeColor: 'black',
5178
+ strokeColor: '#000000',
5179
+ highlightStrokeColor: '#000000',
4992
5180
  highlightStrokeOpacity: 0.666666,
4993
5181
 
4994
5182
  /**
@@ -5221,7 +5409,7 @@ define([
5221
5409
  *
5222
5410
  * @example
5223
5411
  * // Load MathJax:
5224
- * // <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
5412
+ * // &lt;script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"&lt;&lt;/script&gt;
5225
5413
  *
5226
5414
  * // function and its derivative
5227
5415
  * var f1 = function(x) { return x * x * x; },
@@ -5328,9 +5516,99 @@ define([
5328
5516
  *
5329
5517
  * </script><pre>
5330
5518
  *
5519
+ * @example
5520
+ * var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-1, 10, 11, -2], axis: true});
5521
+ * board.options.text.useMathjax = true;
5522
+ *
5523
+ * a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5524
+ * suffixlabel:'\\(t_1=\\)',
5525
+ * unitLabel: ' \\(\\text{ ms}\\)',
5526
+ * snapWidth:0.01}),
5527
+ *
5528
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5529
+ * text1 = board.create('text', [5, 1, function(){
5530
+ * return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
5531
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
5532
+ *
5533
+ * </pre><div id="JXGf8bd01db-fb6a-4a5c-9e7f-8823f7aa5ac6" class="jxgbox" style="width: 300px; height: 300px;"></div>
5534
+ * <script type="text/javascript">
5535
+ * (function() {
5536
+ * var board = JXG.JSXGraph.initBoard('JXGf8bd01db-fb6a-4a5c-9e7f-8823f7aa5ac6',
5537
+ * {boundingbox: [-1, 10, 11, -2], axis: true, showcopyright: false, shownavigation: false});
5538
+ * board.options.text.useMathjax = true;
5539
+ *
5540
+ * a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5541
+ * suffixlabel:'\\(t_1=\\)',
5542
+ * unitLabel: ' \\(\\text{ ms}\\)',
5543
+ * snapWidth:0.01}),
5544
+ *
5545
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5546
+ * text1 = board.create('text', [5, 1, function(){
5547
+ * return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
5548
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
5549
+ *
5550
+ * })();
5551
+ *
5552
+ * </script><pre>
5553
+ *
5331
5554
  */
5332
5555
  useMathJax: false,
5333
5556
 
5557
+ /**
5558
+ *
5559
+ * If true, KaTeX will be used to render the input string.
5560
+ * For this feature, katex.min.js and katex.min.css have to be included.
5561
+ * <p>
5562
+ * The example below does not work, because there is a conflict with
5563
+ * the MathJax library which is used below.
5564
+ * </p>
5565
+ *
5566
+ * @name useKatex
5567
+ * @memberOf Text.prototype
5568
+ * @default false
5569
+ * @type Boolean
5570
+ *
5571
+ *
5572
+ * @example
5573
+ * JXG.Options.text.useKatex = true;
5574
+ *
5575
+ * const board = JXG.JSXGraph.initBoard('jxgbox', {
5576
+ * boundingbox: [-2, 5, 8, -5], axis:true
5577
+ * });
5578
+ *
5579
+ * var a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5580
+ * suffixlabel:'t_1=',
5581
+ * unitLabel: ' \\text{ ms}',
5582
+ * snapWidth:0.01});
5583
+ *
5584
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5585
+ * text1 = board.create('text', [5, 1, function(){
5586
+ * return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
5587
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
5588
+ *
5589
+ * </pre>
5590
+ * <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">
5591
+ * <script src="https://cdn.jsdelivr.net/npm/katex@0.13.10/dist/katex.min.js" integrity="sha384-dtFDxK2tSkECx/6302Z4VN2ZRqt6Gis+b1IwCjJPrn0kMYFQT9rbtyQWg5NFWAF7" crossorigin="anonymous"></script>
5592
+ * <div id="JXG497f065c-cfc1-44c3-ba21-5fa581668869" class="jxgbox" style="width: 300px; height: 300px;"></div>
5593
+ * <script type="text/javascript">
5594
+ * (function() {
5595
+ * var board = JXG.JSXGraph.initBoard('JXG497f065c-cfc1-44c3-ba21-5fa581668869',
5596
+ * {boundingbox: [-2, 5, 8, -5], axis: true, showcopyright: false, shownavigation: false});
5597
+ * board.options.useKatex = true;
5598
+ * var a = board.create('slider',[[-0.7,1.5],[5,1.5],[0,0.5,1]], {
5599
+ * suffixlabel:'t_1=',
5600
+ * unitLabel: ' \\text{ ms}',
5601
+ * snapWidth:0.01});
5602
+ *
5603
+ * func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
5604
+ * text1 = board.create('text', [5, 1, function(){
5605
+ * return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
5606
+ * }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
5607
+ *
5608
+ * })();
5609
+ *
5610
+ * </script><pre>
5611
+ */
5334
5612
  useKatex: false,
5335
5613
 
5336
5614
  /**
@@ -5508,7 +5786,7 @@ define([
5508
5786
  arrow: {
5509
5787
  strokeWidth: 2,
5510
5788
  withLabel: false,
5511
- strokeColor: '#ff0000',
5789
+ strokeColor: Color.palette.red,
5512
5790
  lastArrow: true
5513
5791
  }
5514
5792
  /**#@-*/
@@ -5520,7 +5798,7 @@ define([
5520
5798
  * It is used in {@link JXG.GeometryElement#setAttribute} and in
5521
5799
  * the constructor {@link JXG.GeometryElement}.
5522
5800
  * Attention: In Options.js abbreviations are not allowed.
5523
- * @type {Object}
5801
+ * @type Object
5524
5802
  * @name JXG.Options#shortcuts
5525
5803
  *
5526
5804
  */