jsxgraph 1.4.0 → 1.4.3
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.
- package/README.md +1 -1
- package/distrib/README.md +1 -1
- package/distrib/geogebra.min.js +3 -3
- package/distrib/geonext.min.js +3 -3
- package/distrib/index.d.ts +5205 -4629
- package/distrib/intergeo.min.js +3 -3
- package/distrib/jsxgraph.css +10 -15
- package/distrib/jsxgraphcore.js +9 -25
- package/distrib/jsxgraphsrc.js +4497 -2180
- package/distrib/sketch.min.js +3 -3
- package/package.json +3 -2
- package/src/3d/box3d.js +264 -0
- package/src/3d/curve3d.js +97 -0
- package/src/3d/linspace3d.js +375 -0
- package/src/3d/point3d.js +200 -0
- package/src/3d/surface3d.js +81 -0
- package/src/3d/threed.js +38 -0
- package/src/3d/view3d.js +459 -0
- package/src/base/board.js +139 -85
- package/src/base/chart.js +1 -1
- package/src/base/circle.js +1 -1
- package/src/base/composition.js +1 -1
- package/src/base/constants.js +15 -14
- package/src/base/coords.js +3 -3
- package/src/base/coordselement.js +5 -8
- package/src/base/curve.js +1 -1
- package/src/base/element.js +36 -28
- package/src/base/foreignobject.js +12 -2
- package/src/base/group.js +1 -1
- package/src/base/image.js +1 -1
- package/src/base/line.js +2 -2
- package/src/base/point.js +8 -18
- package/src/base/polygon.js +89 -34
- package/src/base/text.js +8 -7
- package/src/base/ticks.js +17 -3
- package/src/base/transformation.js +1 -1
- package/src/base/turtle.js +1 -1
- package/src/element/arc.js +1 -1
- package/src/element/button.js +1 -1
- package/src/element/checkbox.js +1 -1
- package/src/element/comb.js +1 -1
- package/src/element/composition.js +2 -2
- package/src/element/conic.js +3 -3
- package/src/element/input.js +1 -1
- package/src/element/locus.js +1 -1
- package/src/element/measure.js +9 -4
- package/src/element/sector.js +5 -5
- package/src/element/slider.js +29 -12
- package/src/element/slopetriangle.js +1 -1
- package/src/jsxgraph.js +9 -3
- package/src/jxg.js +3 -3
- package/src/loadjsxgraph.js +18 -12
- package/src/math/bst.js +1 -1
- package/src/math/clip.js +550 -345
- package/src/math/complex.js +1 -1
- package/src/math/extrapolate.js +1 -1
- package/src/math/geometry.js +85 -6
- package/src/math/ia.js +69 -69
- package/src/math/math.js +10 -1
- package/src/math/metapost.js +1 -1
- package/src/math/nlp.js +4 -4
- package/src/math/numerics.js +2 -1
- package/src/math/plot.js +4 -4
- package/src/math/poly.js +1 -1
- package/src/math/probfuncs.js +2 -1
- package/src/math/qdt.js +11 -11
- package/src/math/statistics.js +10 -10
- package/src/math/symbolic.js +1 -1
- package/src/options.js +96 -40
- package/src/options3d.js +123 -0
- package/src/parser/ca.js +1297 -1291
- package/src/parser/datasource.js +1 -1
- package/src/parser/geonext.js +6 -6
- package/src/parser/jessiecode.js +369 -73
- package/src/parser/jessiescript.js +1 -1
- package/src/reader/cinderella.js +1 -1
- package/src/reader/file.js +1 -1
- package/src/reader/geogebra.js +1 -1
- package/src/reader/geonext.js +1 -1
- package/src/reader/graph.js +1 -1
- package/src/reader/intergeo.js +1 -1
- package/src/reader/sketch.js +7 -7
- package/src/renderer/abstract.js +8 -2
- package/src/renderer/canvas.js +9 -5
- package/src/renderer/no.js +2 -1
- package/src/renderer/svg.js +10 -13
- package/src/renderer/vml.js +1 -1
- package/src/server/server.js +1 -1
- package/src/utils/base64.js +2 -2
- package/src/utils/color.js +8 -9
- package/src/utils/dump.js +20 -5
- package/src/utils/env.js +13 -54
- package/src/utils/event.js +1 -1
- package/src/utils/expect.js +1 -1
- package/src/utils/type.js +12 -10
- package/src/utils/xml.js +1 -1
- package/src/utils/zip.js +1 -1
- package/CHANGELOG.md +0 -1366
package/src/math/numerics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Michael Gerhaeuser,
|
|
5
5
|
Carsten Miller,
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
/*global JXG: true, define: true*/
|
|
33
33
|
/*jslint nomen: true, plusplus: true*/
|
|
34
|
+
/*eslint no-loss-of-precision: off */
|
|
34
35
|
|
|
35
36
|
/* depends:
|
|
36
37
|
utils/type
|
package/src/math/plot.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Michael Gerhaeuser,
|
|
5
5
|
Carsten Miller,
|
|
@@ -457,7 +457,7 @@ define(['jxg', 'base/constants', 'base/coords', 'math/math', 'math/extrapolate',
|
|
|
457
457
|
vy = curve.Y(t_real, true) ;
|
|
458
458
|
vy2 = curve.Y(t_real2, true) ;
|
|
459
459
|
dy = (vy - vy2) / (t_real - t_real2);
|
|
460
|
-
|
|
460
|
+
|
|
461
461
|
if (p_good !== null) {
|
|
462
462
|
this._insertPoint_v2(curve, new Coords(Const.COORDS_BY_USER, p_good, curve.board, false));
|
|
463
463
|
return true;
|
|
@@ -1016,7 +1016,7 @@ define(['jxg', 'base/constants', 'base/coords', 'math/math', 'math/extrapolate',
|
|
|
1016
1016
|
},
|
|
1017
1017
|
|
|
1018
1018
|
/**
|
|
1019
|
-
*
|
|
1019
|
+
*
|
|
1020
1020
|
* @param {JXG.Curve} curve JSXGraph curve element
|
|
1021
1021
|
* @param {Number} ta
|
|
1022
1022
|
* @param {Number} tb
|
|
@@ -1959,7 +1959,7 @@ console.log("Polynomial of degree", level);
|
|
|
1959
1959
|
dx, dy;
|
|
1960
1960
|
|
|
1961
1961
|
//console.log("Level", level)
|
|
1962
|
-
if (level
|
|
1962
|
+
if (level === 0) {
|
|
1963
1963
|
this._insertPoint_v4(curve, [1, NaN, NaN], t);
|
|
1964
1964
|
return;
|
|
1965
1965
|
}
|
package/src/math/poly.js
CHANGED
package/src/math/probfuncs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Carsten Miller,
|
|
5
5
|
Andreas Walter,
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
/*global JXG: true, define: true*/
|
|
32
32
|
/*jslint nomen: true, plusplus: true*/
|
|
33
|
+
/*eslint no-loss-of-precision: off */
|
|
33
34
|
|
|
34
35
|
/* depends:
|
|
35
36
|
jxg
|
package/src/math/qdt.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Michael Gerhaeuser,
|
|
5
5
|
Carsten Miller,
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
This file is part of JSXGraph.
|
|
11
11
|
|
|
12
12
|
JSXGraph is free software dual licensed under the GNU LGPL or MIT License.
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
You can redistribute it and/or modify it under the terms of the
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
* GNU Lesser General Public License as published by
|
|
17
17
|
the Free Software Foundation, either version 3 of the License, or
|
|
18
18
|
(at your option) any later version
|
|
19
19
|
OR
|
|
20
20
|
* MIT License: https://github.com/jsxgraph/jsxgraph/blob/master/LICENSE.MIT
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
JSXGraph is distributed in the hope that it will be useful,
|
|
23
23
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
24
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
25
|
GNU Lesser General Public License for more details.
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
You should have received a copy of the GNU Lesser General Public License and
|
|
28
28
|
the MIT License along with JSXGraph. If not, see <http://www.gnu.org/licenses/>
|
|
29
29
|
and <http://opensource.org/licenses/MIT/>.
|
|
@@ -44,7 +44,7 @@ define(['math/math', 'utils/type'], function (Mat, Type) {
|
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Instantiate a new quad tree.
|
|
47
|
-
*
|
|
47
|
+
*
|
|
48
48
|
* @name JXG.Math.Quadtree
|
|
49
49
|
* @exports Mat.Quadtree as JXG.Math.Quadtree
|
|
50
50
|
* @param {Array} bbox Bounding box of the new quad (sub)tree.
|
|
@@ -90,7 +90,7 @@ define(['math/math', 'utils/type'], function (Mat, Type) {
|
|
|
90
90
|
* @type JXG.Math.Quadtree
|
|
91
91
|
*/
|
|
92
92
|
this.southEast = null;
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
/**
|
|
95
95
|
* In a subdivided quad tree this represents the bottom left subtree.
|
|
96
96
|
* @name JXG.Math.Quadtree#southWest
|
|
@@ -155,10 +155,10 @@ define(['math/math', 'utils/type'], function (Mat, Type) {
|
|
|
155
155
|
mx = this.xlb + (this.xub - this.xlb) / 2,
|
|
156
156
|
my = this.ylb + (this.yub - this.ylb) / 2;
|
|
157
157
|
|
|
158
|
-
this.northWest = new Quadtree([this.xlb, this.yub, mx, my]);
|
|
159
|
-
this.northEast = new Quadtree([mx, this.yub, this.xub, my]);
|
|
160
|
-
this.southEast = new Quadtree([this.xlb, my, mx, this.ylb]);
|
|
161
|
-
this.southWest = new Quadtree([mx, my, this.xub, this.ylb]);
|
|
158
|
+
this.northWest = new Mat.Quadtree([this.xlb, this.yub, mx, my]);
|
|
159
|
+
this.northEast = new Mat.Quadtree([mx, this.yub, this.xub, my]);
|
|
160
|
+
this.southEast = new Mat.Quadtree([this.xlb, my, mx, this.ylb]);
|
|
161
|
+
this.southWest = new Mat.Quadtree([mx, my, this.xub, this.ylb]);
|
|
162
162
|
|
|
163
163
|
for (i = 0; i < l; i += 1) {
|
|
164
164
|
this.northWest.insert(this.points[i]);
|
package/src/math/statistics.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Michael Gerhaeuser,
|
|
5
5
|
Carsten Miller,
|
|
@@ -131,10 +131,10 @@ define(['jxg', 'math/math', 'utils/type'], function (JXG, Mat, Type) {
|
|
|
131
131
|
},
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
-
* The P-th percentile ( 0 < P ≤ 100 ) of a list of N ordered values (sorted from least to greatest)
|
|
135
|
-
* is the smallest value in the list such that no more than P percent of the data is strictly less
|
|
134
|
+
* The P-th percentile ( 0 < P ≤ 100 ) of a list of N ordered values (sorted from least to greatest)
|
|
135
|
+
* is the smallest value in the list such that no more than P percent of the data is strictly less
|
|
136
136
|
* than the value and at least P percent of the data is less than or equal to that value. See {@link https://en.wikipedia.org/wiki/Percentile}.
|
|
137
|
-
*
|
|
137
|
+
*
|
|
138
138
|
* Here, the <i>linear interpolation between closest ranks</i> method is used.
|
|
139
139
|
* @param {Array} arr The set of values, need not be ordered.
|
|
140
140
|
* @param {Number|Array} percentile One or several percentiles
|
|
@@ -285,7 +285,7 @@ define(['jxg', 'math/math', 'utils/type'], function (JXG, Mat, Type) {
|
|
|
285
285
|
} else {
|
|
286
286
|
len = arr.length;
|
|
287
287
|
res = [];
|
|
288
|
-
|
|
288
|
+
|
|
289
289
|
for (i = 0; i < len; i++) {
|
|
290
290
|
res[i] = Math.abs(arr[i]);
|
|
291
291
|
}
|
|
@@ -540,7 +540,7 @@ define(['jxg', 'math/math', 'utils/type'], function (JXG, Mat, Type) {
|
|
|
540
540
|
* () => JXG.Math.Statistics.TheilSenRegression(a.map(el => el.coords))
|
|
541
541
|
* ],
|
|
542
542
|
* {strokeWidth:1, strokeColor:'black'});
|
|
543
|
-
*
|
|
543
|
+
*
|
|
544
544
|
* </pre><div id="JXG0a28be85-91c5-44d3-aae6-114e81217cf0" class="jxgbox" style="width: 300px; height: 300px;"></div>
|
|
545
545
|
* <script type="text/javascript">
|
|
546
546
|
* (function() {
|
|
@@ -551,16 +551,16 @@ define(['jxg', 'math/math', 'utils/type'], function (JXG, Mat, Type) {
|
|
|
551
551
|
* a[0]=board.create('point', [0,0]);
|
|
552
552
|
* a[1]=board.create('point', [3,0]);
|
|
553
553
|
* a[2]=board.create('point', [0,3]);
|
|
554
|
-
*
|
|
554
|
+
*
|
|
555
555
|
* board.create('line', [
|
|
556
556
|
* () => JXG.Math.Statistics.TheilSenRegression(a.map(el => el.coords))
|
|
557
557
|
* ],
|
|
558
558
|
* {strokeWidth:1, strokeColor:'black'});
|
|
559
|
-
*
|
|
559
|
+
*
|
|
560
560
|
* })();
|
|
561
|
-
*
|
|
561
|
+
*
|
|
562
562
|
* </script><pre>
|
|
563
|
-
*
|
|
563
|
+
*
|
|
564
564
|
*/
|
|
565
565
|
TheilSenRegression: function (coords) {
|
|
566
566
|
var i, j,
|
package/src/math/symbolic.js
CHANGED
package/src/options.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2008-
|
|
2
|
+
Copyright 2008-2022
|
|
3
3
|
Matthias Ehmann,
|
|
4
4
|
Michael Gerhaeuser,
|
|
5
5
|
Carsten Miller,
|
|
@@ -360,7 +360,7 @@ define([
|
|
|
360
360
|
* @type Object
|
|
361
361
|
*/
|
|
362
362
|
fullscreen: {
|
|
363
|
-
symbol: '\u26f6', // '\u25a1'
|
|
363
|
+
symbol: '\u25a1', // '\u26f6' (not supported by MacOS), // '\u25a1'
|
|
364
364
|
id: null
|
|
365
365
|
},
|
|
366
366
|
|
|
@@ -546,13 +546,13 @@ define([
|
|
|
546
546
|
* factorY: 1.25, // vertical zoom factor (multiplied to {@link JXG.Board#zoomY})
|
|
547
547
|
* wheel: true, // allow zooming by mouse wheel or
|
|
548
548
|
* // by pinch-to-toom gesture on touch devices
|
|
549
|
-
* needShift: true,
|
|
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
|
+
* 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
|
|
552
552
|
*
|
|
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
|
|
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.
|
|
556
556
|
* }
|
|
557
557
|
* </pre>
|
|
558
558
|
*
|
|
@@ -652,11 +652,11 @@ define([
|
|
|
652
652
|
* panCtrl: false
|
|
653
653
|
* }
|
|
654
654
|
* });
|
|
655
|
-
*
|
|
655
|
+
*
|
|
656
656
|
* })();
|
|
657
|
-
*
|
|
657
|
+
*
|
|
658
658
|
* </script><pre>
|
|
659
|
-
*
|
|
659
|
+
*
|
|
660
660
|
*
|
|
661
661
|
* @see JXG.Board#keyDownListener
|
|
662
662
|
* @see JXG.Board#keyFocusInListener
|
|
@@ -704,11 +704,11 @@ define([
|
|
|
704
704
|
* axis: true,
|
|
705
705
|
* resize: {enabled: true, throttle: 200}
|
|
706
706
|
* });
|
|
707
|
-
*
|
|
707
|
+
*
|
|
708
708
|
* })();
|
|
709
|
-
*
|
|
709
|
+
*
|
|
710
710
|
* </script><pre>
|
|
711
|
-
*
|
|
711
|
+
*
|
|
712
712
|
*
|
|
713
713
|
*/
|
|
714
714
|
resize: {
|
|
@@ -753,11 +753,11 @@ define([
|
|
|
753
753
|
* axis: true,
|
|
754
754
|
* moveTarget: document
|
|
755
755
|
* });
|
|
756
|
-
*
|
|
756
|
+
*
|
|
757
757
|
* })();
|
|
758
|
-
*
|
|
758
|
+
*
|
|
759
759
|
* </script><pre>
|
|
760
|
-
*
|
|
760
|
+
*
|
|
761
761
|
*
|
|
762
762
|
*/
|
|
763
763
|
moveTarget: null,
|
|
@@ -783,6 +783,10 @@ define([
|
|
|
783
783
|
* visible: false // Initial visibility. Should be set to false always
|
|
784
784
|
* }
|
|
785
785
|
* </pre>
|
|
786
|
+
* <p>
|
|
787
|
+
* Board events triggered by selection manipulation:
|
|
788
|
+
* 'startselecting', 'stopselecting', 'mousestartselecting', 'mousestopselecting',
|
|
789
|
+
* 'pointerstartselecting', 'pointerstopselecting', 'touchstartselecting', 'touchstopselecting'.
|
|
786
790
|
*
|
|
787
791
|
* @example
|
|
788
792
|
* board.on('stopselecting', function(){
|
|
@@ -796,14 +800,10 @@ define([
|
|
|
796
800
|
* });
|
|
797
801
|
*
|
|
798
802
|
* @name JXG.Board#selection
|
|
799
|
-
*
|
|
800
|
-
* @see JXG.Board#
|
|
801
|
-
* @see JXG.Board#
|
|
802
|
-
*
|
|
803
|
-
* @see JXG.Board#touchstartselecting
|
|
804
|
-
* @see JXG.Board#mousestopselecting
|
|
805
|
-
* @see JXG.Board#pointerstopselecting
|
|
806
|
-
* @see JXG.Board#touchstopselecting
|
|
803
|
+
*
|
|
804
|
+
* @see JXG.Board#startSelectionMode
|
|
805
|
+
* @see JXG.Board#stopSelectionMode
|
|
806
|
+
*
|
|
807
807
|
* @type Object
|
|
808
808
|
* @default
|
|
809
809
|
*/
|
|
@@ -1488,7 +1488,20 @@ define([
|
|
|
1488
1488
|
*/
|
|
1489
1489
|
isLabel: false,
|
|
1490
1490
|
|
|
1491
|
-
|
|
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
|
+
*/
|
|
1492
1505
|
tabindex: 0
|
|
1493
1506
|
|
|
1494
1507
|
// close the meta tag
|
|
@@ -1588,9 +1601,9 @@ define([
|
|
|
1588
1601
|
* }
|
|
1589
1602
|
* },
|
|
1590
1603
|
* });
|
|
1591
|
-
*
|
|
1604
|
+
*
|
|
1592
1605
|
* })();
|
|
1593
|
-
*
|
|
1606
|
+
*
|
|
1594
1607
|
* </script><pre>
|
|
1595
1608
|
*
|
|
1596
1609
|
* @name Ticks#beautifulScientificTickLabels
|
|
@@ -1757,14 +1770,28 @@ define([
|
|
|
1757
1770
|
|
|
1758
1771
|
/**
|
|
1759
1772
|
* If a label exceeds {@link Ticks#maxLabelLength} this determines the precision used to shorten the tick label.
|
|
1773
|
+
* Replaced by the digits attribute.
|
|
1760
1774
|
*
|
|
1761
1775
|
* @type Number
|
|
1762
1776
|
* @name Ticks#precision
|
|
1763
1777
|
* @see Ticks#maxLabelLength
|
|
1778
|
+
* @see Ticks#digits
|
|
1779
|
+
* @deprecated
|
|
1764
1780
|
* @default 3
|
|
1765
1781
|
*/
|
|
1766
1782
|
precision: 3,
|
|
1767
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
|
+
|
|
1768
1795
|
/**
|
|
1769
1796
|
* The default distance between two ticks. Please be aware that this value does not have
|
|
1770
1797
|
* to be used if {@link Ticks#insertTicks} is set to true.
|
|
@@ -2509,7 +2536,7 @@ define([
|
|
|
2509
2536
|
strokeColor: Color.palette.red,
|
|
2510
2537
|
highlightFillColor: '#c3d9ff',
|
|
2511
2538
|
highlightStrokeColor: '#c3d9ff',
|
|
2512
|
-
|
|
2539
|
+
|
|
2513
2540
|
name: ''
|
|
2514
2541
|
},
|
|
2515
2542
|
|
|
@@ -4054,7 +4081,7 @@ define([
|
|
|
4054
4081
|
snatchDistance: 0.0,
|
|
4055
4082
|
|
|
4056
4083
|
/**
|
|
4057
|
-
* If set to true, the point will snap to a grid of integer multiples of
|
|
4084
|
+
* If set to true, the point will snap to a grid of integer multiples of
|
|
4058
4085
|
* {@link Point#snapSizeX} and {@link Point#snapSizeY} (in user coordinates).
|
|
4059
4086
|
* <p>
|
|
4060
4087
|
* The coordinates of the grid points are either integer multiples of snapSizeX and snapSizeY
|
|
@@ -4536,13 +4563,27 @@ define([
|
|
|
4536
4563
|
|
|
4537
4564
|
/**
|
|
4538
4565
|
* The precision of the slider value displayed in the optional text.
|
|
4566
|
+
* Replaced by the attribute "digits".
|
|
4567
|
+
*
|
|
4539
4568
|
* @memberOf Slider.prototype
|
|
4540
4569
|
* @name precision
|
|
4541
4570
|
* @type Number
|
|
4571
|
+
* @deprecated
|
|
4572
|
+
* @see Slider#digits
|
|
4542
4573
|
* @default 2
|
|
4543
4574
|
*/
|
|
4544
4575
|
precision: 2,
|
|
4545
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
|
+
|
|
4546
4587
|
firstArrow: false,
|
|
4547
4588
|
lastArrow: false,
|
|
4548
4589
|
|
|
@@ -4660,6 +4701,7 @@ define([
|
|
|
4660
4701
|
visible: 'inherit',
|
|
4661
4702
|
fixed: true,
|
|
4662
4703
|
scalable: false,
|
|
4704
|
+
tabindex: null,
|
|
4663
4705
|
name: '',
|
|
4664
4706
|
strokeWidth: 1,
|
|
4665
4707
|
strokeColor: '#000000',
|
|
@@ -4678,7 +4720,7 @@ define([
|
|
|
4678
4720
|
|
|
4679
4721
|
// Label drawing
|
|
4680
4722
|
drawLabels: false,
|
|
4681
|
-
|
|
4723
|
+
digits: 2,
|
|
4682
4724
|
includeBoundaries: 1,
|
|
4683
4725
|
drawZero: true,
|
|
4684
4726
|
label: {
|
|
@@ -4709,6 +4751,7 @@ define([
|
|
|
4709
4751
|
strokeWidth: 3,
|
|
4710
4752
|
visible: 'inherit',
|
|
4711
4753
|
fixed: true,
|
|
4754
|
+
tabindex: null,
|
|
4712
4755
|
name: '',
|
|
4713
4756
|
strokeColor: '#000000',
|
|
4714
4757
|
highlightStrokeColor: '#888888'
|
|
@@ -4949,13 +4992,26 @@ define([
|
|
|
4949
4992
|
|
|
4950
4993
|
/**
|
|
4951
4994
|
* The precision of the tape measure value displayed in the optional text.
|
|
4995
|
+
* Replaced by the attribute digits
|
|
4996
|
+
*
|
|
4952
4997
|
* @memberOf Tapemeasure.prototype
|
|
4953
4998
|
* @name precision
|
|
4954
4999
|
* @type Number
|
|
5000
|
+
* @deprecated
|
|
5001
|
+
* @see Tapemeasure#digits
|
|
4955
5002
|
* @default 2
|
|
4956
5003
|
*/
|
|
4957
5004
|
precision: 2,
|
|
4958
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
|
+
|
|
4959
5015
|
/**
|
|
4960
5016
|
* Attributes for first helper point defining the tape measure position.
|
|
4961
5017
|
*
|
|
@@ -5067,11 +5123,11 @@ define([
|
|
|
5067
5123
|
* var board = JXG.JSXGraph.initBoard('JXG2da7e972-ac62-416b-a94b-32559c9ec9f9',
|
|
5068
5124
|
* {boundingbox: [-8, 8, 8,-8], axis: true, showcopyright: false, shownavigation: false});
|
|
5069
5125
|
* var txt = board.create('text', [2, 2, "hello"], {fontSize: 8, fontUnit: 'vmin'});
|
|
5070
|
-
*
|
|
5126
|
+
*
|
|
5071
5127
|
* })();
|
|
5072
|
-
*
|
|
5128
|
+
*
|
|
5073
5129
|
* </script><pre>
|
|
5074
|
-
*
|
|
5130
|
+
*
|
|
5075
5131
|
*/
|
|
5076
5132
|
fontUnit: 'px',
|
|
5077
5133
|
|
|
@@ -5473,7 +5529,7 @@ define([
|
|
|
5473
5529
|
* text1 = board.create('text', [5, 1, function(){
|
|
5474
5530
|
* return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
|
|
5475
5531
|
* }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
|
|
5476
|
-
*
|
|
5532
|
+
*
|
|
5477
5533
|
* </pre><div id="JXGf8bd01db-fb6a-4a5c-9e7f-8823f7aa5ac6" class="jxgbox" style="width: 300px; height: 300px;"></div>
|
|
5478
5534
|
* <script type="text/javascript">
|
|
5479
5535
|
* (function() {
|
|
@@ -5485,12 +5541,12 @@ define([
|
|
|
5485
5541
|
* suffixlabel:'\\(t_1=\\)',
|
|
5486
5542
|
* unitLabel: ' \\(\\text{ ms}\\)',
|
|
5487
5543
|
* snapWidth:0.01}),
|
|
5488
|
-
*
|
|
5544
|
+
*
|
|
5489
5545
|
* func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
|
|
5490
5546
|
* text1 = board.create('text', [5, 1, function(){
|
|
5491
5547
|
* return '\\(a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}\\)';
|
|
5492
5548
|
* }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top', parse: false});
|
|
5493
|
-
*
|
|
5549
|
+
*
|
|
5494
5550
|
* })();
|
|
5495
5551
|
*
|
|
5496
5552
|
* </script><pre>
|
|
@@ -5529,7 +5585,7 @@ define([
|
|
|
5529
5585
|
* text1 = board.create('text', [5, 1, function(){
|
|
5530
5586
|
* return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
|
|
5531
5587
|
* }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
|
|
5532
|
-
*
|
|
5588
|
+
*
|
|
5533
5589
|
* </pre>
|
|
5534
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">
|
|
5535
5591
|
* <script src="https://cdn.jsdelivr.net/npm/katex@0.13.10/dist/katex.min.js" integrity="sha384-dtFDxK2tSkECx/6302Z4VN2ZRqt6Gis+b1IwCjJPrn0kMYFQT9rbtyQWg5NFWAF7" crossorigin="anonymous"></script>
|
|
@@ -5543,12 +5599,12 @@ define([
|
|
|
5543
5599
|
* suffixlabel:'t_1=',
|
|
5544
5600
|
* unitLabel: ' \\text{ ms}',
|
|
5545
5601
|
* snapWidth:0.01});
|
|
5546
|
-
*
|
|
5602
|
+
*
|
|
5547
5603
|
* func = board.create('functiongraph',[function(x){return (a.Value()*x*x)}], {strokeColor: "red"});
|
|
5548
5604
|
* text1 = board.create('text', [5, 1, function(){
|
|
5549
5605
|
* return 'a(t)= { 1 \\over ' + a.Value().toFixed(3) + '}';
|
|
5550
5606
|
* }], {fontSize: 15, fixed:true, strokeColor:'red', anchorY: 'top'});
|
|
5551
|
-
*
|
|
5607
|
+
*
|
|
5552
5608
|
* })();
|
|
5553
5609
|
*
|
|
5554
5610
|
* </script><pre>
|
package/src/options3d.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*global JXG:true, define: true*/
|
|
2
|
+
|
|
3
|
+
define([
|
|
4
|
+
'jxg', 'options'
|
|
5
|
+
], function (JXG, Options) {
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
9
|
+
JXG.extend(Options, {
|
|
10
|
+
|
|
11
|
+
infobox: {
|
|
12
|
+
strokeColor: 'black'
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
axes3d: {
|
|
16
|
+
axesPosition: 'center', // Possible values: 'center', otherwise: border
|
|
17
|
+
|
|
18
|
+
// Main axes
|
|
19
|
+
xAxis: { visible: true, point2: {name: 'x'}},
|
|
20
|
+
yAxis: { visible: true, point2: {name: 'y'}},
|
|
21
|
+
zAxis: { visible: true, point2: {name: 'z'}},
|
|
22
|
+
|
|
23
|
+
// Planes
|
|
24
|
+
xPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } },
|
|
25
|
+
yPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } },
|
|
26
|
+
zPlaneRear: { visible: true, layer: 0, mesh3d: { layer: 1 } },
|
|
27
|
+
|
|
28
|
+
xPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } },
|
|
29
|
+
yPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } },
|
|
30
|
+
zPlaneFront: { visible: false, layer: 0, mesh3d: { layer: 1 } },
|
|
31
|
+
|
|
32
|
+
// Axes on the planes
|
|
33
|
+
xPlaneRearYAxis: {visible: true, strokeColor: '#888888'},
|
|
34
|
+
xPlaneRearZAxis: {visible: true, strokeColor: '#888888'},
|
|
35
|
+
xPlaneFrontYAxis: {visible: false, strokeColor: '#888888'},
|
|
36
|
+
xPlaneFrontZAxis: {visible: false, strokeColor: '#888888'},
|
|
37
|
+
|
|
38
|
+
yPlaneRearXAxis: {visible: true, strokeColor: '#888888'},
|
|
39
|
+
yPlaneRearZAxis: {visible: true, strokeColor: '#888888'},
|
|
40
|
+
yPlaneFrontXAxis: {visible: false, strokeColor: '#888888'},
|
|
41
|
+
yPlaneFrontZAxis: {visible: false, strokeColor: '#888888'},
|
|
42
|
+
|
|
43
|
+
zPlaneRearXAxis: {visible: true, strokeColor: '#888888'},
|
|
44
|
+
zPlaneRearYAxis: {visible: true, strokeColor: '#888888'},
|
|
45
|
+
zPlaneFrontXAxis: {visible: false, strokeColor: '#888888'},
|
|
46
|
+
zPlaneFrontYAxis: {visible: false, strokeColor: '#888888'}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
axis3d: {
|
|
51
|
+
highlight: false,
|
|
52
|
+
strokecolor: 'black',
|
|
53
|
+
strokeWidth: 1,
|
|
54
|
+
tabindex: null,
|
|
55
|
+
|
|
56
|
+
point1: { visible: false, name: '' },
|
|
57
|
+
point2: { visible: false, name: '', label: { visible: true } }
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
mesh3d: {
|
|
61
|
+
strokeWidth: 1,
|
|
62
|
+
strokeColor: '#9a9a9a',
|
|
63
|
+
strokeOpacity: 0.6,
|
|
64
|
+
highlight: false,
|
|
65
|
+
fillColor: '#9a9a9a',
|
|
66
|
+
fillOpacity: 0.1,
|
|
67
|
+
tabindex: null,
|
|
68
|
+
|
|
69
|
+
visible: 'inherit'
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
line3d: {
|
|
73
|
+
strokeWidth: 1,
|
|
74
|
+
strokeColor: 'black',
|
|
75
|
+
fixed: true,
|
|
76
|
+
tabindex: null,
|
|
77
|
+
|
|
78
|
+
gradient: 'linear',
|
|
79
|
+
gradientSecondColor: '#ffffff',
|
|
80
|
+
|
|
81
|
+
point1: {visible: false, name: ''},
|
|
82
|
+
point2: {visible: false, name: ''}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
plane3d: {
|
|
86
|
+
strokeWidth: 0,
|
|
87
|
+
strokeColor: 'black',
|
|
88
|
+
strokeOpacity: 1,
|
|
89
|
+
highlight: false,
|
|
90
|
+
tabindex: null,
|
|
91
|
+
|
|
92
|
+
gradient: 'linear',
|
|
93
|
+
gradientSecondColor: '#ffffff',
|
|
94
|
+
gradientAngle: Math.PI,
|
|
95
|
+
fillColor: '#a7a7a7',
|
|
96
|
+
fillOpacity: 0.6
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
point3d: {
|
|
100
|
+
strokeWidth: 0,
|
|
101
|
+
gradient: 'radial',
|
|
102
|
+
gradientSecondColor: '#555555',
|
|
103
|
+
fillColor: 'yellow',
|
|
104
|
+
highlightStrokeColor: '#555555'
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
surface3d: {
|
|
108
|
+
highlight: false,
|
|
109
|
+
tabindex: -1,
|
|
110
|
+
strokeWidth: 1,
|
|
111
|
+
stepsU: 30,
|
|
112
|
+
stepsV: 30
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
view3d: {
|
|
116
|
+
needsRegularUpdate: true
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
return JXG.Options;
|
|
122
|
+
});
|
|
123
|
+
|