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.
- package/README.md +2 -2
- package/distrib/README.md +2 -2
- package/distrib/geogebra.min.js +3 -3
- package/distrib/geonext.min.js +3 -3
- package/distrib/index.d.ts +651 -448
- package/distrib/intergeo.min.js +3 -3
- package/distrib/jsxgraph.css +4 -13
- package/distrib/jsxgraphcore.js +9 -25
- package/distrib/jsxgraphsrc.js +28203 -25234
- package/distrib/sketch.min.js +3 -3
- package/package.json +11 -22
- package/src/base/board.js +674 -469
- package/src/base/chart.js +1 -1
- package/src/base/circle.js +23 -1
- package/src/base/composition.js +1 -1
- package/src/base/constants.js +32 -11
- package/src/base/coords.js +4 -4
- package/src/base/coordselement.js +51 -24
- package/src/base/curve.js +308 -117
- package/src/base/element.js +79 -50
- package/src/base/foreignobject.js +463 -0
- package/src/base/group.js +2 -2
- package/src/base/image.js +12 -15
- package/src/base/line.js +108 -21
- package/src/base/point.js +24 -28
- package/src/base/polygon.js +75 -18
- package/src/base/text.js +116 -63
- package/src/base/ticks.js +29 -11
- 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 +29 -2
- package/src/element/checkbox.js +31 -1
- package/src/element/comb.js +5 -2
- package/src/element/composition.js +127 -19
- package/src/element/conic.js +46 -5
- package/src/element/input.js +32 -1
- package/src/element/locus.js +2 -2
- package/src/element/measure.js +9 -4
- package/src/element/sector.js +46 -12
- package/src/element/slider.js +17 -12
- package/src/element/slopetriangle.js +1 -1
- package/src/jsxgraph.js +28 -9
- package/src/jxg.js +4 -3
- package/src/loadjsxgraph.js +3 -2
- 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 +155 -126
- package/src/math/ia.js +290 -21
- package/src/math/math.js +30 -1
- package/src/math/metapost.js +1 -1
- package/src/math/nlp.js +25 -5
- package/src/math/numerics.js +183 -4
- 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 +68 -62
- package/src/math/statistics.js +58 -7
- package/src/math/symbolic.js +1 -1
- package/src/options.js +377 -114
- 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 +275 -79
- 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 +21 -13
- package/src/renderer/abstract.js +21 -6
- package/src/renderer/canvas.js +22 -15
- package/src/renderer/no.js +11 -4
- package/src/renderer/svg.js +76 -53
- package/src/renderer/vml.js +36 -32
- package/src/server/server.js +1 -1
- package/src/utils/base64.js +2 -2
- package/src/utils/color.js +148 -3
- package/src/utils/dump.js +21 -15
- package/src/utils/env.js +63 -104
- package/src/utils/event.js +1 -1
- package/src/utils/expect.js +1 -1
- package/src/utils/type.js +30 -19
- package/src/utils/xml.js +1 -1
- package/src/utils/zip.js +1 -1
- package/CHANGELOG.md +0 -1281
package/distrib/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
/* eslint-disable max-len */
|
|
6
6
|
/* eslint-disable @typescript-eslint/prefer-namespace-keyword */
|
|
7
|
-
//
|
|
7
|
+
//
|
|
8
|
+
// Type definitions for JSXGraph 1.4.x
|
|
8
9
|
// Project: https://jsxgraph.org
|
|
9
10
|
// Definitions by: David Holmes https://github.com/geometryzen
|
|
10
11
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
11
12
|
//
|
|
12
|
-
// Copyright 2015-
|
|
13
|
-
// JSXGraph 1.2.3
|
|
13
|
+
// Copyright 2015-2022 David Holmes, https://github.com/geometryzen
|
|
14
14
|
//
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -20,11 +20,15 @@ declare module JXG {
|
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type CoordType = 1 | 2
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* User coordinates relative to the coordinates system defined by the bounding box.
|
|
26
|
+
*/
|
|
27
|
+
export const COORDS_BY_USER: 0x0001;
|
|
28
|
+
/**
|
|
29
|
+
* Screen coordinates in pixel relative to the upper left corner of the div element.
|
|
26
30
|
*/
|
|
27
|
-
export const
|
|
31
|
+
export const COORDS_BY_SCREEN: 0x0002;
|
|
28
32
|
/**
|
|
29
33
|
* A composition is a simple container that manages none or more GeometryElements.
|
|
30
34
|
*/
|
|
@@ -81,16 +85,68 @@ declare module JXG {
|
|
|
81
85
|
*/
|
|
82
86
|
updateRenderer(): void
|
|
83
87
|
}
|
|
88
|
+
|
|
84
89
|
/**
|
|
85
|
-
*
|
|
90
|
+
* This is the Coordinates class. All members a coordinate has to provide are defined here.
|
|
86
91
|
*/
|
|
87
92
|
export class Coords {
|
|
88
|
-
constructor(size: number, coords: number[], board: Board);
|
|
89
93
|
/**
|
|
90
|
-
*
|
|
94
|
+
* Constructs a new Coordinates object.
|
|
95
|
+
* @param method The type of coordinates given by the user. Accepted values are COORDS_BY_SCREEN and COORDS_BY_USER.
|
|
96
|
+
* @param coordinates An array of affine coordinates.
|
|
97
|
+
* @param board A reference to a board.
|
|
98
|
+
* @param emitter If true, this coordinates object will emit update events every time the coordinates are set. Default is true.
|
|
91
99
|
*/
|
|
92
|
-
|
|
100
|
+
constructor(method: CoordType, coordinates: [number, number, number], board: Board, emitter?: boolean);
|
|
101
|
+
/**
|
|
102
|
+
* Stores the board the object is used on.
|
|
103
|
+
*/
|
|
104
|
+
board: Board;
|
|
105
|
+
/**
|
|
106
|
+
* If true, this coordinates object will emit update events every time the coordinates are set.
|
|
107
|
+
*/
|
|
108
|
+
emitter: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Stores coordinates for screen view as homogeneous coordinates.
|
|
111
|
+
*/
|
|
112
|
+
scrCoords: [z: number, x: number, y: number];
|
|
113
|
+
/**
|
|
114
|
+
* Stores coordinates for user view as homogeneous coordinates.
|
|
115
|
+
*/
|
|
116
|
+
usrCoords: [number, number, number];
|
|
117
|
+
/**
|
|
118
|
+
* Copy array, either scrCoords or usrCoords. Uses slice() in case of standard arrays and set() in case of typed arrays.
|
|
119
|
+
* @param obj Either 'scrCoords' for COORDS_BY_SCREEN coordinates or 'usrCoords' for COORDS_BY_USER coordinates.
|
|
120
|
+
* @param offset The index to begin the copying from. Defaults to 0 if not given.
|
|
121
|
+
*/
|
|
122
|
+
copy(obj: 'scrCoords' | 'usrCoords', offset?: number): number[];
|
|
123
|
+
copy(obj: 'scrCoords' | 'usrCoords'): [number, number, number];
|
|
124
|
+
copy(obj: 'scrCoords' | 'usrCoords', offset: 0): [number, number, number];
|
|
125
|
+
copy(obj: 'scrCoords' | 'usrCoords', offset: 1): [number, number];
|
|
126
|
+
copy(obj: 'scrCoords' | 'usrCoords', offset: 2): [number];
|
|
127
|
+
/**
|
|
128
|
+
* Calculate distance of one point to another.
|
|
129
|
+
* @param method The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
|
|
130
|
+
* @param coordinates The Coords object to which the distance is calculated.
|
|
131
|
+
* @returns The distance.
|
|
132
|
+
*/
|
|
133
|
+
distance(method: CoordType, coordinates: Coords): number;
|
|
134
|
+
/**
|
|
135
|
+
* Set coordinates by either user coordinates or screen coordinates and recalculate the other one.
|
|
136
|
+
* @param method The type of coordinates used here. Possible values are COORDS_BY_USER and COORDS_BY_SCREEN.
|
|
137
|
+
* @param coordinates An array of affine coordinates the Coords object is set to.
|
|
138
|
+
* @param doRound flag If true or null round the coordinates in usr2screen. This is used in smooth curve plotting. Internet Explorer needs rounded coordinates. If doRound==false we have to round in updatePathString.
|
|
139
|
+
* @param noevent
|
|
140
|
+
* @returns A reference to this coords object.
|
|
141
|
+
*/
|
|
142
|
+
setCoordinates(method: CoordType, coordinates: [number, number, number], doRound?: boolean, noevent?: boolean): this;
|
|
143
|
+
/**
|
|
144
|
+
* Test if one of the usrCoords is NaN or the coordinates are infinite.
|
|
145
|
+
* @returns true if the coordinates are finite, false otherwise.
|
|
146
|
+
*/
|
|
147
|
+
isReal(): boolean;
|
|
93
148
|
}
|
|
149
|
+
|
|
94
150
|
/**
|
|
95
151
|
* A JessieCode object provides an interface to the parser and stores all variables and objects used within a JessieCode script.
|
|
96
152
|
* The optional argument code is interpreted after initializing.
|
|
@@ -199,10 +255,10 @@ declare module JXG {
|
|
|
199
255
|
export function hex2rgb(hex: string): string;
|
|
200
256
|
/**
|
|
201
257
|
* Converts HSV color to RGB color. Based on C Code in "Computer Graphics -- Principles and Practice," Foley et al, 1996, p. 593. See also http://www.efg2.com/Lab/Graphics/Colors/HSV.htm
|
|
202
|
-
* param H value between 0 and 360
|
|
203
|
-
* param S value between 0.0 (shade of gray) to 1.0 (pure color)
|
|
204
|
-
* param V value between 0.0 (black) to 1.0 (white)
|
|
205
|
-
*
|
|
258
|
+
* @param H value between 0 and 360
|
|
259
|
+
* @param S value between 0.0 (shade of gray) to 1.0 (pure color)
|
|
260
|
+
* @param V value between 0.0 (black) to 1.0 (white)
|
|
261
|
+
* @returns RGB color string
|
|
206
262
|
*/
|
|
207
263
|
export function hsv2rgb(H: number, S: number, V: number): string;
|
|
208
264
|
export function isAndroid(): boolean;
|
|
@@ -256,7 +312,7 @@ declare module JXG {
|
|
|
256
312
|
export function supportsVML();
|
|
257
313
|
export function swap<T>(arr: T[], i: number, j: number): T[];
|
|
258
314
|
export function timedChunk(items: unknown[], process: Function, context: unknown, callback: Function): void;
|
|
259
|
-
export function toFixed(num: number,
|
|
315
|
+
export function toFixed(num: number, digits: number): string;
|
|
260
316
|
export function toFullscreen(wrap_id: string, jsxgraph_id: string, scale?: unknown): void;
|
|
261
317
|
export function toJSON(obj: unknown, noquote?: boolean): string;
|
|
262
318
|
export function trim(str: string): string;
|
|
@@ -298,6 +354,12 @@ declare module JXG {
|
|
|
298
354
|
*/
|
|
299
355
|
id: string;
|
|
300
356
|
|
|
357
|
+
/**
|
|
358
|
+
* The label subelement (if it is defined).
|
|
359
|
+
* @see hasLabel
|
|
360
|
+
*/
|
|
361
|
+
label?: Text;
|
|
362
|
+
|
|
301
363
|
/**
|
|
302
364
|
* Not necessarily unique name for the element.
|
|
303
365
|
*/
|
|
@@ -313,9 +375,12 @@ declare module JXG {
|
|
|
313
375
|
|
|
314
376
|
quadraticform: unknown[];
|
|
315
377
|
|
|
316
|
-
rendNode:
|
|
378
|
+
rendNode: HTMLElement;
|
|
317
379
|
|
|
318
|
-
|
|
380
|
+
/**
|
|
381
|
+
* The homogeneous coordinates of the line ([C,A,B] where A*x+B*y+C*z=0).
|
|
382
|
+
*/
|
|
383
|
+
stdform: [C: number, A: number, B: number];
|
|
319
384
|
|
|
320
385
|
subs: unknown;
|
|
321
386
|
|
|
@@ -332,11 +397,11 @@ declare module JXG {
|
|
|
332
397
|
visPropCalc: { [name: string]: unknown };
|
|
333
398
|
|
|
334
399
|
/**
|
|
335
|
-
*
|
|
336
|
-
* @param board
|
|
337
|
-
* @param attributes
|
|
338
|
-
* @param type
|
|
339
|
-
* @param oclass
|
|
400
|
+
*
|
|
401
|
+
* @param board
|
|
402
|
+
* @param attributes
|
|
403
|
+
* @param type
|
|
404
|
+
* @param oclass
|
|
340
405
|
*/
|
|
341
406
|
constructor(board: Board, attributes: GeometryElementAttributes, type: number, oclass: number);
|
|
342
407
|
|
|
@@ -370,10 +435,10 @@ declare module JXG {
|
|
|
370
435
|
/**
|
|
371
436
|
* Hide the element. It will still exist but not be visible on the board.
|
|
372
437
|
* Alias for "element.setAttribute({visible: false});"
|
|
373
|
-
* @
|
|
438
|
+
* @returns Reference to the element
|
|
374
439
|
*/
|
|
375
440
|
hide(): void;
|
|
376
|
-
|
|
441
|
+
|
|
377
442
|
/**
|
|
378
443
|
* Hides the element. It will still exist but not be visible on the board.
|
|
379
444
|
* Alias for JXG.GeometryElement#hide
|
|
@@ -384,15 +449,15 @@ declare module JXG {
|
|
|
384
449
|
/**
|
|
385
450
|
* Register a new event handler.
|
|
386
451
|
* For a list of possible events see documentation of the elements and objects implementing the EventEmitter interface.
|
|
387
|
-
* param event
|
|
388
|
-
* param handler
|
|
389
|
-
* param context The context the handler will be called in, default is the element itself.
|
|
452
|
+
* @param event
|
|
453
|
+
* @param handler
|
|
454
|
+
* @param context The context the handler will be called in, default is the element itself.
|
|
390
455
|
*/
|
|
391
456
|
on(event: string, handler: (e: Event) => void, context?: unknown): void;
|
|
392
457
|
|
|
393
458
|
/**
|
|
394
459
|
* Sets an arbitrary number of attributes.
|
|
395
|
-
* param attributes An object with attributes.
|
|
460
|
+
* @param attributes An object with attributes.
|
|
396
461
|
*/
|
|
397
462
|
setAttribute(attributes: GeometryElementAttributes): this;
|
|
398
463
|
|
|
@@ -411,13 +476,13 @@ declare module JXG {
|
|
|
411
476
|
|
|
412
477
|
/**
|
|
413
478
|
* Updates the element's label text, strips all html.
|
|
414
|
-
* param text The element label text.
|
|
479
|
+
* @param text The element label text.
|
|
415
480
|
*/
|
|
416
481
|
setLabelText(text: string): string;
|
|
417
482
|
|
|
418
483
|
/**
|
|
419
484
|
* Updates the element's label text and the element's attribute "name", strips all html.
|
|
420
|
-
* param name The element name.
|
|
485
|
+
* @param name The element name.
|
|
421
486
|
*/
|
|
422
487
|
setName(name: string): string;
|
|
423
488
|
|
|
@@ -445,15 +510,14 @@ declare module JXG {
|
|
|
445
510
|
* Moves an element by the difference of two coordinates.
|
|
446
511
|
* @param method The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
|
|
447
512
|
* @param coords coordinates in screen/user units
|
|
448
|
-
* @param oldcoords previous coordinates in screen/user units
|
|
449
513
|
* @returns Reference to the element.
|
|
450
514
|
*/
|
|
451
|
-
setPositionDirectly(method: number, coords: number[]
|
|
515
|
+
setPositionDirectly(method: number, coords: number[]): this;
|
|
452
516
|
|
|
453
517
|
/**
|
|
454
518
|
* Make the element visible.
|
|
455
519
|
* Alias for "element.setAttribute({visible: true});"
|
|
456
|
-
* @
|
|
520
|
+
* @returns Reference to the element
|
|
457
521
|
*/
|
|
458
522
|
show(): void;
|
|
459
523
|
|
|
@@ -684,7 +748,16 @@ declare module JXG {
|
|
|
684
748
|
layer?: number;
|
|
685
749
|
|
|
686
750
|
/**
|
|
687
|
-
*
|
|
751
|
+
* Precision options for JSXGraph elements.
|
|
752
|
+
* This attributes takes either the value 'inherit' or an object of the form:
|
|
753
|
+
* <pre>
|
|
754
|
+
* precision: {
|
|
755
|
+
* touch: 30,
|
|
756
|
+
* mouse: 4,
|
|
757
|
+
* pen: 4
|
|
758
|
+
* }
|
|
759
|
+
* </pre>
|
|
760
|
+
*
|
|
688
761
|
*/
|
|
689
762
|
precision?: PrecisionOptions;
|
|
690
763
|
|
|
@@ -863,9 +936,6 @@ declare module JXG {
|
|
|
863
936
|
* Starts an animated point movement towards the given coordinates where.
|
|
864
937
|
* The animation is done after time milliseconds.
|
|
865
938
|
* If the second parameter is not given or is equal to 0, setPosition() is called, see #setPosition.
|
|
866
|
-
* param where Array containing the x and y coordinate of the target location.
|
|
867
|
-
* param time Number of milliseconds the animation should last.
|
|
868
|
-
* param options
|
|
869
939
|
* @param where Array containing the x and y coordinate of the target location.
|
|
870
940
|
* @param time Number of milliseconds the animation should last.
|
|
871
941
|
* @param options Optional settings for the animation.
|
|
@@ -1105,8 +1175,15 @@ declare module JXG {
|
|
|
1105
1175
|
*/
|
|
1106
1176
|
midpoint: Point;
|
|
1107
1177
|
/**
|
|
1108
|
-
*
|
|
1178
|
+
* Checks whether (x,y) is near the segment.
|
|
1179
|
+
* @param x: Coordinate in x direction, screen coordinates.
|
|
1180
|
+
* @param y: Coordinate in y direction, screen coordinates.
|
|
1181
|
+
* @param start: Optional start index for search on data plots.
|
|
1109
1182
|
*/
|
|
1183
|
+
hasPoint(x: number, y: number, start?: number): boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
*
|
|
1186
|
+
*/
|
|
1110
1187
|
Radius(): number;
|
|
1111
1188
|
}
|
|
1112
1189
|
|
|
@@ -1135,7 +1212,9 @@ declare module JXG {
|
|
|
1135
1212
|
export interface CircleOptions {
|
|
1136
1213
|
center?: PointAttributes;
|
|
1137
1214
|
fillColor?: string;
|
|
1215
|
+
fixed?: boolean;
|
|
1138
1216
|
hasInnerPoints?: boolean;
|
|
1217
|
+
highlight?: boolean;
|
|
1139
1218
|
highlightFillColor?: string;
|
|
1140
1219
|
highlightStrokeColor?: string;
|
|
1141
1220
|
label?: LabelOptions;
|
|
@@ -1260,11 +1339,11 @@ declare module JXG {
|
|
|
1260
1339
|
generateTerm(varname: unknown, xterm: unknown, yterm: unknown, mi: unknown, ma: unknown): any;
|
|
1261
1340
|
/**
|
|
1262
1341
|
* Checks whether (x,y) is near the curve.
|
|
1263
|
-
* x: Coordinate in x direction, screen coordinates.
|
|
1264
|
-
* y: Coordinate in y direction, screen coordinates.
|
|
1265
|
-
* start: Optional start index for search on data plots.
|
|
1342
|
+
* @param x: Coordinate in x direction, screen coordinates.
|
|
1343
|
+
* @param y: Coordinate in y direction, screen coordinates.
|
|
1344
|
+
* @param start: Optional start index for search on data plots.
|
|
1266
1345
|
*/
|
|
1267
|
-
hasPoint(x: number, y: number, start
|
|
1346
|
+
hasPoint(x: number, y: number, start?: number): boolean;
|
|
1268
1347
|
/**
|
|
1269
1348
|
* Gives the default value of the right bound for the curve.
|
|
1270
1349
|
* May be overwritten in generateTerm.
|
|
@@ -1372,8 +1451,8 @@ declare module JXG {
|
|
|
1372
1451
|
*/
|
|
1373
1452
|
export class Group extends GeometryElement {
|
|
1374
1453
|
/**
|
|
1375
|
-
*
|
|
1376
|
-
* @param board
|
|
1454
|
+
*
|
|
1455
|
+
* @param board
|
|
1377
1456
|
* @param id Unique identifier for this object. If null or an empty string is given, an unique id will be generated by Board.
|
|
1378
1457
|
* @param name Not necessarily unique name, displayed on the board. If null or an empty string is given, an unique name will be generated.
|
|
1379
1458
|
* @param objects Array of points to add to this group.
|
|
@@ -1402,18 +1481,18 @@ declare module JXG {
|
|
|
1402
1481
|
addPoints(objects: Point[]): this;
|
|
1403
1482
|
/**
|
|
1404
1483
|
* Adds a point to the set of rotation points of the group. Dragging at one of these points results into a rotation of the whole group around the rotation center of the group {@see JXG.Group#setRotationCenter}.
|
|
1405
|
-
* @param point
|
|
1484
|
+
* @param point
|
|
1406
1485
|
*/
|
|
1407
1486
|
addRotationPoint(point: Point): this;
|
|
1408
1487
|
/**
|
|
1409
1488
|
* Adds a point to the set of the scale points of the group. Dragging at one of these points results into a scaling of the whole group.
|
|
1410
|
-
* @param point
|
|
1489
|
+
* @param point
|
|
1411
1490
|
* @param direction Restricts the directions to be scaled. Possible values are 'x', 'y', 'xy'. Default value is 'xy'.
|
|
1412
1491
|
*/
|
|
1413
1492
|
addScalePoint(point: Point, direction?: 'x' | 'y' | 'xy'): this;
|
|
1414
1493
|
/**
|
|
1415
1494
|
* Adds a point to the set of the translation points of the group. Dragging one of these points results into a translation of the whole group.
|
|
1416
|
-
* @param point
|
|
1495
|
+
* @param point
|
|
1417
1496
|
*/
|
|
1418
1497
|
addTranslationPoint(point: Point): this;
|
|
1419
1498
|
/**
|
|
@@ -1422,32 +1501,32 @@ declare module JXG {
|
|
|
1422
1501
|
getParents(): string[];
|
|
1423
1502
|
/**
|
|
1424
1503
|
* Removes a point from the group.
|
|
1425
|
-
* @param point
|
|
1504
|
+
* @param point
|
|
1426
1505
|
*/
|
|
1427
1506
|
removePoint(point: Point): this;
|
|
1428
1507
|
/**
|
|
1429
1508
|
* Removes the rotation property from a point of the group.
|
|
1430
|
-
* @param point
|
|
1509
|
+
* @param point
|
|
1431
1510
|
*/
|
|
1432
1511
|
removeRotationPoint(point: Point): this;
|
|
1433
1512
|
/**
|
|
1434
1513
|
* Removes the scaling property from a point of the group.
|
|
1435
|
-
* @param point
|
|
1514
|
+
* @param point
|
|
1436
1515
|
*/
|
|
1437
1516
|
removeScalePoint(point: Point): this;
|
|
1438
1517
|
/**
|
|
1439
1518
|
* Removes the translation property from a point of the group.
|
|
1440
|
-
* @param point
|
|
1519
|
+
* @param point
|
|
1441
1520
|
*/
|
|
1442
1521
|
removeTranslationPoint(point: Point): this;
|
|
1443
1522
|
/**
|
|
1444
1523
|
* Sets ids of elements to the array this.parents. This is a copy of Element.setParents First, this.parents is cleared. See Group#addParents.
|
|
1445
|
-
* @param parents
|
|
1524
|
+
* @param parents
|
|
1446
1525
|
*/
|
|
1447
1526
|
setParents(parents: (string | GeometryElement)[]): this;
|
|
1448
1527
|
/**
|
|
1449
1528
|
* Sets the center of rotation for the group. This is either a point or the centroid of the group.
|
|
1450
|
-
* @param object
|
|
1529
|
+
* @param object
|
|
1451
1530
|
*/
|
|
1452
1531
|
setRotationCenter(object: Point | 'centroid' | [number, number] | (() => [number, number])): this;
|
|
1453
1532
|
/**
|
|
@@ -1457,7 +1536,7 @@ declare module JXG {
|
|
|
1457
1536
|
setRotationPoints(objects: Point[]): this;
|
|
1458
1537
|
/**
|
|
1459
1538
|
* Sets the center of scaling for the group. This is either a point or the centroid of the group.
|
|
1460
|
-
* @param object
|
|
1539
|
+
* @param object
|
|
1461
1540
|
*/
|
|
1462
1541
|
setScaleCenter(object: Point | 'centroid' | [number, number] | (() => [number, number])): this;
|
|
1463
1542
|
/**
|
|
@@ -1515,6 +1594,7 @@ declare module JXG {
|
|
|
1515
1594
|
}
|
|
1516
1595
|
|
|
1517
1596
|
export interface InfoboxOptions extends TextOptions {
|
|
1597
|
+
layer?: number;
|
|
1518
1598
|
needsRegularUpdate?: boolean;
|
|
1519
1599
|
transitionDuration?: number;
|
|
1520
1600
|
}
|
|
@@ -1533,6 +1613,7 @@ declare module JXG {
|
|
|
1533
1613
|
display?: 'internal';
|
|
1534
1614
|
fixed?: boolean;
|
|
1535
1615
|
fontSize?: number;
|
|
1616
|
+
highlight?: boolean;
|
|
1536
1617
|
highlightStrokeColor?: string;
|
|
1537
1618
|
highlightStrokeOpacity?: number;
|
|
1538
1619
|
layer?: number;
|
|
@@ -1548,6 +1629,7 @@ declare module JXG {
|
|
|
1548
1629
|
position?: 'lft' | 'rt' | 'top' | 'bot' | 'ulft' | 'urt' | 'llft' | 'lrt';
|
|
1549
1630
|
strokeColor?: string;
|
|
1550
1631
|
strokeOpacity?: number;
|
|
1632
|
+
useMathJax?: boolean;
|
|
1551
1633
|
visible?: 'inherit' | boolean;
|
|
1552
1634
|
}
|
|
1553
1635
|
|
|
@@ -1686,7 +1768,7 @@ declare module JXG {
|
|
|
1686
1768
|
/**
|
|
1687
1769
|
* Set an angle to a prescribed value given in radians.
|
|
1688
1770
|
* This is only possible if the third point of the angle, i.e. the anglepoint is a free point.
|
|
1689
|
-
* param val Number or Function which returns the size of the angle in Radians.
|
|
1771
|
+
* @param val Number or Function which returns the size of the angle in Radians.
|
|
1690
1772
|
*/
|
|
1691
1773
|
setAngle(val: number | NumberFunction): Angle;
|
|
1692
1774
|
|
|
@@ -1773,7 +1855,16 @@ declare module JXG {
|
|
|
1773
1855
|
X(): number;
|
|
1774
1856
|
Y(): number;
|
|
1775
1857
|
Dist(point: Point): number;
|
|
1858
|
+
/**
|
|
1859
|
+
* Test if the point is on (is incident with) the element.
|
|
1860
|
+
* @param element The geometry element being used as a reference point.
|
|
1861
|
+
* @param tolerance The optional tolerance value. Defaults to Math.eps
|
|
1862
|
+
*/
|
|
1863
|
+
isOn(element: GeometryElement, tolerance?: number): boolean;
|
|
1776
1864
|
setAttribute(attributes: PointAttributes): this;
|
|
1865
|
+
ref: [x: number, y: number] | (() => [x: number, y: number]);
|
|
1866
|
+
scale: [x: number, y: number] | (() => [x: number, y: number]);
|
|
1867
|
+
dp: [x: number, y: number] | (() => [x: number, y: number]);
|
|
1777
1868
|
}
|
|
1778
1869
|
|
|
1779
1870
|
type FaceType =
|
|
@@ -1907,7 +1998,26 @@ declare module JXG {
|
|
|
1907
1998
|
}
|
|
1908
1999
|
|
|
1909
2000
|
export interface PointOptions {
|
|
1910
|
-
|
|
2001
|
+
/**
|
|
2002
|
+
*
|
|
2003
|
+
*/
|
|
2004
|
+
fixed: boolean;
|
|
2005
|
+
/**
|
|
2006
|
+
*
|
|
2007
|
+
*/
|
|
2008
|
+
highlight?: boolean;
|
|
2009
|
+
/**
|
|
2010
|
+
*
|
|
2011
|
+
*/
|
|
2012
|
+
snapSizeX: number;
|
|
2013
|
+
/**
|
|
2014
|
+
*
|
|
2015
|
+
*/
|
|
2016
|
+
snapSizeY: number;
|
|
2017
|
+
/**
|
|
2018
|
+
*
|
|
2019
|
+
*/
|
|
2020
|
+
snapToGrid: boolean;
|
|
1911
2021
|
}
|
|
1912
2022
|
|
|
1913
2023
|
export interface Perpendicular extends Segment {
|
|
@@ -1952,7 +2062,14 @@ declare module JXG {
|
|
|
1952
2062
|
remove(): void;
|
|
1953
2063
|
removePoints(p: Point): this;
|
|
1954
2064
|
setAttribute(attributes: PolygonAttributes): this;
|
|
1955
|
-
|
|
2065
|
+
/**
|
|
2066
|
+
* Moves an element by the difference of two coordinates.
|
|
2067
|
+
* @param method The type of coordinates used here. Possible values are JXG.COORDS_BY_USER and JXG.COORDS_BY_SCREEN.
|
|
2068
|
+
* @param coords coordinates in screen/user units
|
|
2069
|
+
* @param oldcoords
|
|
2070
|
+
* @returns Reference to this Polygon.
|
|
2071
|
+
*/
|
|
2072
|
+
setPositionDirectly(method: number, coords: unknown[], oldcoords?: unknown[]): this;
|
|
1956
2073
|
showElement(borderless?: boolean): void;
|
|
1957
2074
|
updateRenderer(): void;
|
|
1958
2075
|
}
|
|
@@ -1987,7 +2104,7 @@ declare module JXG {
|
|
|
1987
2104
|
/**
|
|
1988
2105
|
* Attributes for the polygon border lines.
|
|
1989
2106
|
*/
|
|
1990
|
-
borders
|
|
2107
|
+
borders: LineOptions;
|
|
1991
2108
|
/**
|
|
1992
2109
|
* If true, moving the mouse over inner points triggers hasPoint.
|
|
1993
2110
|
*/
|
|
@@ -2094,7 +2211,7 @@ declare module JXG {
|
|
|
2094
2211
|
lastArrow?: boolean | ArrowSpecification;
|
|
2095
2212
|
label?: LabelOptions;
|
|
2096
2213
|
moveOnUp?: boolean;
|
|
2097
|
-
|
|
2214
|
+
digits?: number;
|
|
2098
2215
|
point1?: PointAttributes;
|
|
2099
2216
|
point2?: PointAttributes;
|
|
2100
2217
|
postLabel?: string | StringFunction | number | NumberFunction | null;
|
|
@@ -2117,7 +2234,7 @@ declare module JXG {
|
|
|
2117
2234
|
lastArrow?: boolean | ArrowSpecification;
|
|
2118
2235
|
label?: LabelOptions;
|
|
2119
2236
|
moveOnUp?: boolean;
|
|
2120
|
-
|
|
2237
|
+
digits?: number;
|
|
2121
2238
|
point1?: PointOptions;
|
|
2122
2239
|
point2?: PointOptions;
|
|
2123
2240
|
postLabel?: string | StringFunction | number | NumberFunction | null;
|
|
@@ -2227,7 +2344,7 @@ declare module JXG {
|
|
|
2227
2344
|
*/
|
|
2228
2345
|
lastArrow?: boolean | { type?: number; highlightSize?: number; size?: number };
|
|
2229
2346
|
/**
|
|
2230
|
-
*
|
|
2347
|
+
*
|
|
2231
2348
|
*/
|
|
2232
2349
|
point1?: PointAttributes;
|
|
2233
2350
|
/**
|
|
@@ -2249,6 +2366,10 @@ declare module JXG {
|
|
|
2249
2366
|
* Determines whether the line has an arrow at the first defining point.
|
|
2250
2367
|
*/
|
|
2251
2368
|
firstArrow?: boolean | { type?: number; highlightSize?: number; size?: number };
|
|
2369
|
+
/**
|
|
2370
|
+
*
|
|
2371
|
+
*/
|
|
2372
|
+
fixed?: boolean;
|
|
2252
2373
|
/**
|
|
2253
2374
|
* Determines whether the line has an arrow at the second defining point.
|
|
2254
2375
|
*/
|
|
@@ -2298,7 +2419,7 @@ declare module JXG {
|
|
|
2298
2419
|
*/
|
|
2299
2420
|
touchLastPoint?: boolean;
|
|
2300
2421
|
/**
|
|
2301
|
-
*
|
|
2422
|
+
*
|
|
2302
2423
|
*/
|
|
2303
2424
|
margin?: number;
|
|
2304
2425
|
/**
|
|
@@ -2382,7 +2503,7 @@ declare module JXG {
|
|
|
2382
2503
|
setAttribute(attributes: ArrowAttributes): this;
|
|
2383
2504
|
}
|
|
2384
2505
|
export interface ArrowAttributes extends GeometryElementAttributes {
|
|
2385
|
-
firstArrow?: boolean;
|
|
2506
|
+
firstArrow?: boolean | ArrowSpecification;
|
|
2386
2507
|
lastArrow?: boolean | ArrowSpecification
|
|
2387
2508
|
}
|
|
2388
2509
|
export interface ArrowOptions extends GeometryElementOptions {
|
|
@@ -2449,6 +2570,11 @@ declare module JXG {
|
|
|
2449
2570
|
}
|
|
2450
2571
|
export interface MidpointAttributes extends PointAttributes { }
|
|
2451
2572
|
|
|
2573
|
+
export interface MinorArc extends Arc {
|
|
2574
|
+
setAttribute(attributes: MinorArcAttributes): this;
|
|
2575
|
+
}
|
|
2576
|
+
export interface MinorArcAttributes extends ArcAttributes { }
|
|
2577
|
+
|
|
2452
2578
|
/**
|
|
2453
2579
|
* A mirror element is determined by the reflection of a given point across another given point.
|
|
2454
2580
|
*/
|
|
@@ -2491,6 +2617,14 @@ declare module JXG {
|
|
|
2491
2617
|
*
|
|
2492
2618
|
*/
|
|
2493
2619
|
export interface Segment extends Line {
|
|
2620
|
+
/**
|
|
2621
|
+
* Checks whether (x,y) is near the segment.
|
|
2622
|
+
* @param x: Coordinate in x direction, screen coordinates.
|
|
2623
|
+
* @param y: Coordinate in y direction, screen coordinates.
|
|
2624
|
+
* @param start: Optional start index for search on data plots.
|
|
2625
|
+
*/
|
|
2626
|
+
hasPoint(x: number, y: number, start?: number): boolean;
|
|
2627
|
+
|
|
2494
2628
|
setAttribute(attributes: SegmentAttributes): this;
|
|
2495
2629
|
}
|
|
2496
2630
|
export interface SegmentAttributes extends LineAttributes { }
|
|
@@ -2516,7 +2650,7 @@ declare module JXG {
|
|
|
2516
2650
|
*/
|
|
2517
2651
|
anchor?: 'left' | 'middle' | 'right';
|
|
2518
2652
|
/**
|
|
2519
|
-
*
|
|
2653
|
+
*
|
|
2520
2654
|
*/
|
|
2521
2655
|
beautifulScientificTickLabels?: boolean;
|
|
2522
2656
|
/**
|
|
@@ -2579,13 +2713,13 @@ declare module JXG {
|
|
|
2579
2713
|
/**
|
|
2580
2714
|
*
|
|
2581
2715
|
*/
|
|
2582
|
-
|
|
2716
|
+
digits?: number;
|
|
2583
2717
|
/**
|
|
2584
2718
|
*
|
|
2585
2719
|
*/
|
|
2586
2720
|
scale?: number;
|
|
2587
2721
|
/**
|
|
2588
|
-
*
|
|
2722
|
+
*
|
|
2589
2723
|
*/
|
|
2590
2724
|
scaleSymbol?: string;
|
|
2591
2725
|
/**
|
|
@@ -2597,7 +2731,7 @@ declare module JXG {
|
|
|
2597
2731
|
*/
|
|
2598
2732
|
ticksDistance?: number;
|
|
2599
2733
|
/**
|
|
2600
|
-
*
|
|
2734
|
+
*
|
|
2601
2735
|
*/
|
|
2602
2736
|
type?: 'line' | 'string';
|
|
2603
2737
|
/**
|
|
@@ -2627,7 +2761,7 @@ declare module JXG {
|
|
|
2627
2761
|
minorTicks?: number;
|
|
2628
2762
|
minTicksDistance?: number;
|
|
2629
2763
|
needsRegularUpdate?: boolean;
|
|
2630
|
-
|
|
2764
|
+
digits?: number;
|
|
2631
2765
|
scale?: number;
|
|
2632
2766
|
scaleSymbol?: string;
|
|
2633
2767
|
strokeColor?: string;
|
|
@@ -2651,13 +2785,13 @@ declare module JXG {
|
|
|
2651
2785
|
label?: LabelOptions;
|
|
2652
2786
|
point1?: PointAttributes;
|
|
2653
2787
|
point2?: PointAttributes;
|
|
2654
|
-
|
|
2788
|
+
digits?: number;
|
|
2655
2789
|
ticks?: TicksAttributes;
|
|
2656
2790
|
withLabel?: boolean;
|
|
2657
2791
|
withTicks?: boolean;
|
|
2658
2792
|
}
|
|
2659
2793
|
export interface TapemeasureOptions extends LineOptions {
|
|
2660
|
-
|
|
2794
|
+
digits?: number;
|
|
2661
2795
|
}
|
|
2662
2796
|
|
|
2663
2797
|
export interface Tracecurve extends Curve { }
|
|
@@ -2894,6 +3028,7 @@ declare module JXG {
|
|
|
2894
3028
|
| 'chart'
|
|
2895
3029
|
| 'checkbox'
|
|
2896
3030
|
| 'circle'
|
|
3031
|
+
| 'comb'
|
|
2897
3032
|
| 'conic'
|
|
2898
3033
|
| 'curve'
|
|
2899
3034
|
| 'ellipse'
|
|
@@ -2907,12 +3042,14 @@ declare module JXG {
|
|
|
2907
3042
|
| 'input'
|
|
2908
3043
|
| 'integral'
|
|
2909
3044
|
| 'line'
|
|
3045
|
+
| 'minorArc'
|
|
2910
3046
|
| 'plot'
|
|
2911
3047
|
| 'point'
|
|
2912
3048
|
| 'polygon'
|
|
2913
3049
|
| 'reflection'
|
|
2914
3050
|
| 'riemannsum'
|
|
2915
3051
|
| 'segment'
|
|
3052
|
+
| 'semicircle'
|
|
2916
3053
|
| 'slider'
|
|
2917
3054
|
| 'slopetriangle'
|
|
2918
3055
|
| 'stepfunction'
|
|
@@ -3010,14 +3147,14 @@ declare module JXG {
|
|
|
3010
3147
|
*/
|
|
3011
3148
|
export class Board {
|
|
3012
3149
|
/**
|
|
3013
|
-
*
|
|
3014
|
-
* @param event
|
|
3015
|
-
* @param handler
|
|
3016
|
-
* @param context
|
|
3150
|
+
*
|
|
3151
|
+
* @param event
|
|
3152
|
+
* @param handler
|
|
3153
|
+
* @param context
|
|
3017
3154
|
*/
|
|
3018
3155
|
addEvent(event: string, handler: (evt: PointerEvent) => void, context?: {}): {};
|
|
3019
3156
|
/**
|
|
3020
|
-
*
|
|
3157
|
+
*
|
|
3021
3158
|
*/
|
|
3022
3159
|
animationObjects: unknown;
|
|
3023
3160
|
/**
|
|
@@ -3025,11 +3162,11 @@ declare module JXG {
|
|
|
3025
3162
|
*/
|
|
3026
3163
|
attr: BoardAttributes;
|
|
3027
3164
|
/**
|
|
3028
|
-
*
|
|
3165
|
+
*
|
|
3029
3166
|
*/
|
|
3030
3167
|
BOARD_MODE_DRAG: number;
|
|
3031
3168
|
/**
|
|
3032
|
-
*
|
|
3169
|
+
*
|
|
3033
3170
|
*/
|
|
3034
3171
|
BOARD_MODE_MOVE_ORIGIN: number;
|
|
3035
3172
|
/**
|
|
@@ -3037,15 +3174,15 @@ declare module JXG {
|
|
|
3037
3174
|
*/
|
|
3038
3175
|
BOARD_MODE_NONE: number;
|
|
3039
3176
|
/**
|
|
3040
|
-
*
|
|
3177
|
+
*
|
|
3041
3178
|
*/
|
|
3042
3179
|
BOARD_MODE_ZOOM: number;
|
|
3043
3180
|
/**
|
|
3044
|
-
*
|
|
3181
|
+
*
|
|
3045
3182
|
*/
|
|
3046
3183
|
BOARD_QUALITY_HIGH: number;
|
|
3047
3184
|
/**
|
|
3048
|
-
*
|
|
3185
|
+
*
|
|
3049
3186
|
*/
|
|
3050
3187
|
BOARD_QUALITY_LOW: number;
|
|
3051
3188
|
/**
|
|
@@ -3123,19 +3260,19 @@ declare module JXG {
|
|
|
3123
3260
|
hasGrid?: boolean;
|
|
3124
3261
|
/**
|
|
3125
3262
|
* A flag which tells if the board registers mouse events.
|
|
3126
|
-
*
|
|
3263
|
+
*
|
|
3127
3264
|
* Default is false.
|
|
3128
3265
|
*/
|
|
3129
3266
|
hasMouseHandlers: boolean;
|
|
3130
3267
|
/**
|
|
3131
3268
|
* A flag which tells if the board the mouseUp event registered.
|
|
3132
|
-
*
|
|
3269
|
+
*
|
|
3133
3270
|
* Default is false.
|
|
3134
3271
|
*/
|
|
3135
3272
|
hasMouseUp: boolean;
|
|
3136
3273
|
/**
|
|
3137
3274
|
* A flag which stores if the board registered pointer events.
|
|
3138
|
-
*
|
|
3275
|
+
*
|
|
3139
3276
|
* Default is false.
|
|
3140
3277
|
*/
|
|
3141
3278
|
hasPointerHandlers: boolean;
|
|
@@ -3156,8 +3293,13 @@ declare module JXG {
|
|
|
3156
3293
|
*/
|
|
3157
3294
|
highlightedObjects: { [name: string]: unknown };
|
|
3158
3295
|
/**
|
|
3159
|
-
*
|
|
3296
|
+
* Information box close to points in which the coordinates of the point are displayed.
|
|
3297
|
+
* Uses CSS class .JXGinfobox.
|
|
3160
3298
|
*/
|
|
3299
|
+
infobox: Text
|
|
3300
|
+
/**
|
|
3301
|
+
* During the update process this is set to false to prevent an endless loop.
|
|
3302
|
+
*/
|
|
3161
3303
|
inUpdate: boolean;
|
|
3162
3304
|
/**
|
|
3163
3305
|
* A flag which tells us if the user is selecting.
|
|
@@ -3199,7 +3341,7 @@ declare module JXG {
|
|
|
3199
3341
|
*/
|
|
3200
3342
|
objectsList: unknown[];
|
|
3201
3343
|
/**
|
|
3202
|
-
*
|
|
3344
|
+
*
|
|
3203
3345
|
*/
|
|
3204
3346
|
off: Function;
|
|
3205
3347
|
/**
|
|
@@ -3217,12 +3359,12 @@ declare module JXG {
|
|
|
3217
3359
|
* If reducedUpdate is set to true then only the dragged element and few (e.g. 2) following elements are updated during mouse move.
|
|
3218
3360
|
* On mouse up the whole construction is updated.
|
|
3219
3361
|
* This enables us to be fast even on very slow devices.
|
|
3220
|
-
*
|
|
3362
|
+
*
|
|
3221
3363
|
* Default is false.
|
|
3222
3364
|
*/
|
|
3223
3365
|
reducedUpdate: boolean;
|
|
3224
3366
|
/**
|
|
3225
|
-
*
|
|
3367
|
+
*
|
|
3226
3368
|
*/
|
|
3227
3369
|
removeEvent: Function;
|
|
3228
3370
|
/**
|
|
@@ -3340,371 +3482,392 @@ declare module JXG {
|
|
|
3340
3482
|
clickRightArrow(): this;
|
|
3341
3483
|
clickUpArrow(): this;
|
|
3342
3484
|
/**
|
|
3343
|
-
*
|
|
3485
|
+
*
|
|
3344
3486
|
* @param elementType 'angle'
|
|
3345
3487
|
* @param parents [centerPoint, radiusPoint, anglePoint] or [line1, line2, coords1 or direction1, coords2 or direction2]
|
|
3346
|
-
* @param attributes
|
|
3488
|
+
* @param attributes
|
|
3347
3489
|
*/
|
|
3348
3490
|
create(elementType: 'angle', parents: unknown[], attributes?: AngleAttributes): Angle;
|
|
3349
3491
|
/**
|
|
3350
|
-
*
|
|
3492
|
+
*
|
|
3351
3493
|
* @param elementType 'arc'
|
|
3352
|
-
* @param parents
|
|
3353
|
-
* @param attributes
|
|
3494
|
+
* @param parents
|
|
3495
|
+
* @param attributes
|
|
3354
3496
|
*/
|
|
3355
3497
|
create(elementType: 'arc', parents: unknown[], attributes?: ArcAttributes): Arc;
|
|
3356
3498
|
/**
|
|
3357
|
-
*
|
|
3499
|
+
*
|
|
3358
3500
|
* @param elementType 'arrow'
|
|
3359
|
-
* @param parents
|
|
3360
|
-
* @param attributes
|
|
3501
|
+
* @param parents
|
|
3502
|
+
* @param attributes
|
|
3361
3503
|
*/
|
|
3362
3504
|
create(elementType: 'arrow', parents: unknown[], attributes?: ArrowAttributes): Arrow;
|
|
3363
3505
|
/**
|
|
3364
|
-
*
|
|
3506
|
+
*
|
|
3365
3507
|
* @param elementType 'axis'
|
|
3366
|
-
* @param parents
|
|
3367
|
-
* @param attributes
|
|
3508
|
+
* @param parents
|
|
3509
|
+
* @param attributes
|
|
3368
3510
|
*/
|
|
3369
3511
|
create(elementType: 'axis', parents: unknown[], attributes?: AxisAttributes): Axis;
|
|
3370
3512
|
/**
|
|
3371
|
-
*
|
|
3513
|
+
*
|
|
3372
3514
|
* @param elementType 'bisector'
|
|
3373
|
-
* @param parents
|
|
3374
|
-
* @param attributes
|
|
3515
|
+
* @param parents
|
|
3516
|
+
* @param attributes
|
|
3375
3517
|
*/
|
|
3376
3518
|
create(elementType: 'bisector', parents: unknown[], attributes?: BisectorAttributes): Bisector;
|
|
3377
3519
|
/**
|
|
3378
|
-
*
|
|
3520
|
+
*
|
|
3379
3521
|
* @param elementType 'button'
|
|
3380
|
-
* @param parents
|
|
3381
|
-
* @param attributes
|
|
3522
|
+
* @param parents
|
|
3523
|
+
* @param attributes
|
|
3382
3524
|
*/
|
|
3383
3525
|
create(elementType: 'button', parents: unknown[], attributes?: ButtonAttributes): Button;
|
|
3384
3526
|
/**
|
|
3385
|
-
*
|
|
3527
|
+
*
|
|
3386
3528
|
* @param elementType 'cardinalspline'
|
|
3387
|
-
* @param parents
|
|
3388
|
-
* @param attributes
|
|
3529
|
+
* @param parents
|
|
3530
|
+
* @param attributes
|
|
3389
3531
|
*/
|
|
3390
3532
|
create(elementType: 'cardinalspline', parents: unknown[], attributes?: CardinalsplineAttributes): Cardinalspline;
|
|
3391
3533
|
/**
|
|
3392
|
-
*
|
|
3534
|
+
*
|
|
3393
3535
|
* @param elementType 'chart'
|
|
3394
|
-
* @param parents
|
|
3395
|
-
* @param attributes
|
|
3536
|
+
* @param parents
|
|
3537
|
+
* @param attributes
|
|
3396
3538
|
*/
|
|
3397
3539
|
create(elementType: 'chart', parents: unknown[], attributes?: ChartAttributes): Chart;
|
|
3398
3540
|
/**
|
|
3399
|
-
*
|
|
3541
|
+
*
|
|
3400
3542
|
* @param elementType 'checkbox'
|
|
3401
|
-
* @param parents
|
|
3402
|
-
* @param attributes
|
|
3543
|
+
* @param parents
|
|
3544
|
+
* @param attributes
|
|
3403
3545
|
*/
|
|
3404
3546
|
create(elementType: 'checkbox', parents: unknown[], attributes?: CheckboxAttributes): Checkbox;
|
|
3405
3547
|
/**
|
|
3406
|
-
*
|
|
3548
|
+
*
|
|
3407
3549
|
* @param elementType 'circle'
|
|
3408
|
-
* @param parents
|
|
3409
|
-
* @param attributes
|
|
3550
|
+
* @param parents
|
|
3551
|
+
* @param attributes
|
|
3410
3552
|
*/
|
|
3411
3553
|
create(elementType: 'circle', parents: unknown[], attributes?: CircleAttributes): Circle;
|
|
3412
3554
|
/**
|
|
3413
3555
|
* @param elementType 'circumcircle'
|
|
3414
|
-
* @param parents
|
|
3415
|
-
* @param attributes
|
|
3556
|
+
* @param parents
|
|
3557
|
+
* @param attributes
|
|
3416
3558
|
*/
|
|
3417
3559
|
create(elementType: 'circumcircle', parents: unknown[], attributes?: CircumcircleAttributes): Circumcircle;
|
|
3418
3560
|
/**
|
|
3419
3561
|
* @param elementType 'circumcirclearc'
|
|
3420
|
-
* @param parents
|
|
3421
|
-
* @param attributes
|
|
3562
|
+
* @param parents
|
|
3563
|
+
* @param attributes
|
|
3422
3564
|
*/
|
|
3423
3565
|
create(elementType: 'circumcirclearc', parents: unknown[], attributes?: CircumcircleArcAttributes): CircumcircleArc;
|
|
3424
3566
|
/**
|
|
3425
3567
|
* @param elementType 'circumcirclesector'
|
|
3426
|
-
* @param parents
|
|
3427
|
-
* @param attributes
|
|
3568
|
+
* @param parents
|
|
3569
|
+
* @param attributes
|
|
3428
3570
|
*/
|
|
3429
3571
|
create(elementType: 'circumcirclesector', parents: unknown[], attributes?: CircumcircleSectorAttributes): CircumcircleSector;
|
|
3430
3572
|
/**
|
|
3431
|
-
*
|
|
3573
|
+
*
|
|
3574
|
+
* @param elementType 'comb'
|
|
3575
|
+
* @param parents
|
|
3576
|
+
* @param attributes
|
|
3577
|
+
*/
|
|
3578
|
+
create(elementType: 'comb', parents: unknown[], attributes?: CombAttributes): Comb;
|
|
3579
|
+
/**
|
|
3580
|
+
*
|
|
3432
3581
|
* @param elementType 'conic'
|
|
3433
|
-
* @param parents
|
|
3434
|
-
* @param attributes
|
|
3582
|
+
* @param parents
|
|
3583
|
+
* @param attributes
|
|
3435
3584
|
*/
|
|
3436
3585
|
create(elementType: 'conic', parents: unknown[], attributes?: ConicAttributes): Conic;
|
|
3437
3586
|
/**
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3587
|
+
*
|
|
3588
|
+
* @param elementType 'curve'
|
|
3589
|
+
* @param parents
|
|
3590
|
+
* @param attributes
|
|
3591
|
+
*/
|
|
3443
3592
|
create(elementType: 'curve', parents: unknown[], attributes?: CurveAttributes): Curve;
|
|
3444
3593
|
/**
|
|
3445
|
-
*
|
|
3594
|
+
*
|
|
3446
3595
|
* @param elementType 'curvedifference'
|
|
3447
|
-
* @param parents
|
|
3448
|
-
* @param attributes
|
|
3596
|
+
* @param parents
|
|
3597
|
+
* @param attributes
|
|
3449
3598
|
*/
|
|
3450
3599
|
create(elementType: 'curvedifference', parents: unknown[], attributes?: CurveAttributes): Curve;
|
|
3451
3600
|
/**
|
|
3452
|
-
*
|
|
3601
|
+
*
|
|
3453
3602
|
* @param elementType 'curveintersection'
|
|
3454
|
-
* @param parents
|
|
3455
|
-
* @param attributes
|
|
3603
|
+
* @param parents
|
|
3604
|
+
* @param attributes
|
|
3456
3605
|
*/
|
|
3457
3606
|
create(elementType: 'curveintersection', parents: unknown[], attributes?: CurveAttributes): Curve;
|
|
3458
3607
|
/**
|
|
3459
|
-
*
|
|
3608
|
+
*
|
|
3460
3609
|
* @param elementType 'curveunion'
|
|
3461
|
-
* @param parents
|
|
3462
|
-
* @param attributes
|
|
3610
|
+
* @param parents
|
|
3611
|
+
* @param attributes
|
|
3463
3612
|
*/
|
|
3464
3613
|
create(elementType: 'curveunion', parents: unknown[], attributes?: CurveAttributes): Curve;
|
|
3465
3614
|
/**
|
|
3466
|
-
*
|
|
3615
|
+
*
|
|
3467
3616
|
* @param elementType 'ellipse'
|
|
3468
|
-
* @param parents
|
|
3469
|
-
* @param attributes
|
|
3617
|
+
* @param parents
|
|
3618
|
+
* @param attributes
|
|
3470
3619
|
*/
|
|
3471
3620
|
create(elementType: 'ellipse', parents: unknown[], attributes?: EllipseAttributes): Ellipse;
|
|
3472
3621
|
/**
|
|
3473
|
-
*
|
|
3622
|
+
*
|
|
3474
3623
|
* @param elementType 'functiongraph'
|
|
3475
|
-
* @param parents
|
|
3476
|
-
* @param attributes
|
|
3624
|
+
* @param parents
|
|
3625
|
+
* @param attributes
|
|
3477
3626
|
*/
|
|
3478
3627
|
create(elementType: 'functiongraph', parents: unknown[] | ((x: number) => number), attributes?: FunctiongraphAttributes): Functiongraph;
|
|
3479
3628
|
/**
|
|
3480
|
-
*
|
|
3629
|
+
*
|
|
3481
3630
|
* @param elementType 'glider'
|
|
3482
|
-
* @param parents
|
|
3483
|
-
* @param attributes
|
|
3631
|
+
* @param parents
|
|
3632
|
+
* @param attributes
|
|
3484
3633
|
*/
|
|
3485
3634
|
create(elementType: 'glider', parents: unknown[], attributes?: GliderAttributes): Glider;
|
|
3486
3635
|
/**
|
|
3487
|
-
*
|
|
3636
|
+
*
|
|
3488
3637
|
* @param elementType 'grid'
|
|
3489
|
-
* @param parents
|
|
3490
|
-
* @param attributes
|
|
3638
|
+
* @param parents
|
|
3639
|
+
* @param attributes
|
|
3491
3640
|
*/
|
|
3492
3641
|
create(elementType: 'grid', parents: unknown[], attributes?: GridAttributes): Grid;
|
|
3493
3642
|
/**
|
|
3494
|
-
*
|
|
3643
|
+
*
|
|
3495
3644
|
* @param elementType 'group'
|
|
3496
|
-
* @param parents
|
|
3497
|
-
* @param attributes
|
|
3645
|
+
* @param parents
|
|
3646
|
+
* @param attributes
|
|
3498
3647
|
*/
|
|
3499
3648
|
create(elementType: 'group', parents: unknown[], attributes?: GroupAttributes): Group;
|
|
3500
3649
|
/**
|
|
3501
|
-
*
|
|
3650
|
+
*
|
|
3502
3651
|
* @param elementType 'hatch'
|
|
3503
|
-
* @param parents
|
|
3504
|
-
* @param attributes
|
|
3652
|
+
* @param parents
|
|
3653
|
+
* @param attributes
|
|
3505
3654
|
*/
|
|
3506
3655
|
create(elementType: 'hatch', parents: unknown[], attributes?: HatchAttributes): Hatch;
|
|
3507
3656
|
/**
|
|
3508
|
-
*
|
|
3657
|
+
*
|
|
3509
3658
|
* @param elementType 'hyperbola'
|
|
3510
|
-
* @param parents
|
|
3511
|
-
* @param attributes
|
|
3659
|
+
* @param parents
|
|
3660
|
+
* @param attributes
|
|
3512
3661
|
*/
|
|
3513
3662
|
create(elementType: 'hyperbola', parents: unknown[], attributes?: {}): Hyperbola;
|
|
3514
3663
|
/**
|
|
3515
|
-
*
|
|
3664
|
+
*
|
|
3516
3665
|
* @param elementType 'image'
|
|
3517
|
-
* @param parents
|
|
3518
|
-
* @param attributes
|
|
3666
|
+
* @param parents
|
|
3667
|
+
* @param attributes
|
|
3519
3668
|
*/
|
|
3520
3669
|
create(elementType: 'image', parents: unknown[], attributes?: ImageAttributes): Image;
|
|
3521
3670
|
/**
|
|
3522
|
-
*
|
|
3671
|
+
*
|
|
3523
3672
|
* @param elementType 'input'
|
|
3524
|
-
* @param parents
|
|
3525
|
-
* @param attributes
|
|
3673
|
+
* @param parents
|
|
3674
|
+
* @param attributes
|
|
3526
3675
|
*/
|
|
3527
3676
|
create(elementType: 'input', parents: unknown[], attributes?: InputAttributes): Input;
|
|
3528
3677
|
/**
|
|
3529
|
-
*
|
|
3678
|
+
*
|
|
3530
3679
|
* @param elementType 'integral'
|
|
3531
|
-
* @param parents
|
|
3532
|
-
* @param attributes
|
|
3680
|
+
* @param parents
|
|
3681
|
+
* @param attributes
|
|
3533
3682
|
*/
|
|
3534
3683
|
create(elementType: 'integral', parents: unknown[], attributes?: IntegralAttributes): Integral;
|
|
3535
3684
|
/**
|
|
3536
|
-
*
|
|
3685
|
+
*
|
|
3537
3686
|
* @param elementType 'intersection'
|
|
3538
|
-
* @param parents
|
|
3539
|
-
* @param attributes
|
|
3687
|
+
* @param parents
|
|
3688
|
+
* @param attributes
|
|
3540
3689
|
*/
|
|
3541
3690
|
create(elementType: 'intersection', parents: unknown[], attributes?: IntersectionAttributes): Intersection;
|
|
3542
3691
|
/**
|
|
3543
|
-
*
|
|
3692
|
+
*
|
|
3544
3693
|
* @param elementType 'line'
|
|
3545
|
-
* @param parents
|
|
3546
|
-
* @param attributes
|
|
3694
|
+
* @param parents
|
|
3695
|
+
* @param attributes
|
|
3547
3696
|
*/
|
|
3548
3697
|
create(elementType: 'line', parents: unknown[], attributes?: LineAttributes): Line;
|
|
3549
3698
|
/**
|
|
3550
|
-
*
|
|
3699
|
+
*
|
|
3551
3700
|
* @param elementType 'metapostspline'
|
|
3552
|
-
* @param parents
|
|
3553
|
-
* @param attributes
|
|
3701
|
+
* @param parents
|
|
3702
|
+
* @param attributes
|
|
3554
3703
|
*/
|
|
3555
3704
|
create(elementType: 'metapostspline', parents: unknown[], attributes?: MetapostsplineAttributes): Metapostspline;
|
|
3556
3705
|
/**
|
|
3557
|
-
*
|
|
3706
|
+
*
|
|
3558
3707
|
* @param elementType 'midpoint'
|
|
3559
|
-
* @param parents
|
|
3560
|
-
* @param attributes
|
|
3708
|
+
* @param parents
|
|
3709
|
+
* @param attributes
|
|
3561
3710
|
*/
|
|
3562
3711
|
create(elementType: 'midpoint', parents: unknown[], attributes?: MidpointAttributes): Midpoint;
|
|
3563
3712
|
/**
|
|
3564
|
-
*
|
|
3565
|
-
* @param elementType '
|
|
3566
|
-
* @param parents
|
|
3567
|
-
* @param attributes
|
|
3713
|
+
*
|
|
3714
|
+
* @param elementType 'minorArc'
|
|
3715
|
+
* @param parents
|
|
3716
|
+
* @param attributes
|
|
3568
3717
|
*/
|
|
3718
|
+
create(elementType: 'minorArc', parents: unknown[], attributes?: MinorArcAttributes): MinorArc;
|
|
3719
|
+
/**
|
|
3720
|
+
*
|
|
3721
|
+
* @param elementType 'mirrorelement'
|
|
3722
|
+
* @param parents
|
|
3723
|
+
* @param attributes
|
|
3724
|
+
*/
|
|
3569
3725
|
create(elementType: 'mirrorelement', parents: unknown[], attributes?: MirrorelementAttributes): Mirrorelement;
|
|
3570
3726
|
/**
|
|
3571
|
-
*
|
|
3727
|
+
*
|
|
3572
3728
|
* @param elementType 'normal'
|
|
3573
|
-
* @param parents
|
|
3574
|
-
* @param attributes
|
|
3729
|
+
* @param parents
|
|
3730
|
+
* @param attributes
|
|
3575
3731
|
*/
|
|
3576
3732
|
create(elementType: 'normal', parents: unknown[], attributes?: NormalAttributes): Normal;
|
|
3577
3733
|
/**
|
|
3578
|
-
*
|
|
3734
|
+
*
|
|
3579
3735
|
* @param elementType 'perpendicular'
|
|
3580
|
-
* @param parents
|
|
3581
|
-
* @param attributes
|
|
3736
|
+
* @param parents
|
|
3737
|
+
* @param attributes
|
|
3582
3738
|
*/
|
|
3583
3739
|
create(elementType: 'perpendicular', parents: unknown[], attributes?: PerpendicularAttributes): Perpendicular;
|
|
3584
3740
|
/**
|
|
3585
|
-
*
|
|
3741
|
+
*
|
|
3586
3742
|
* @param elementType 'plot'
|
|
3587
|
-
* @param parents
|
|
3588
|
-
* @param attributes
|
|
3743
|
+
* @param parents
|
|
3744
|
+
* @param attributes
|
|
3589
3745
|
*/
|
|
3590
3746
|
create(elementType: 'plot', parents: unknown[], attributes?: CurveAttributes): Curve;
|
|
3591
3747
|
/**
|
|
3592
|
-
*
|
|
3748
|
+
*
|
|
3593
3749
|
* @param elementType 'point'
|
|
3594
3750
|
* @param parents [x, y], [z, x, y], and [element, transformation].
|
|
3595
|
-
* @param attributes
|
|
3751
|
+
* @param attributes
|
|
3596
3752
|
*/
|
|
3597
3753
|
create(elementType: 'point', parents: unknown[], attributes?: PointAttributes): Point;
|
|
3598
3754
|
/**
|
|
3599
|
-
*
|
|
3755
|
+
*
|
|
3600
3756
|
* @param elementType 'polygon'
|
|
3601
|
-
* @param parents
|
|
3602
|
-
* @param attributes
|
|
3757
|
+
* @param parents
|
|
3758
|
+
* @param attributes
|
|
3603
3759
|
*/
|
|
3604
3760
|
create(elementType: 'polygon', parents: unknown[], attributes?: PolygonAttributes): Polygon;
|
|
3605
3761
|
/**
|
|
3606
|
-
*
|
|
3762
|
+
*
|
|
3607
3763
|
* @param elementType 'polygonalchain'
|
|
3608
|
-
* @param parents
|
|
3609
|
-
* @param attributes
|
|
3764
|
+
* @param parents
|
|
3765
|
+
* @param attributes
|
|
3610
3766
|
*/
|
|
3611
3767
|
create(elementType: 'polygonalchain', parents: unknown[], attributes?: PolygonAttributes): Polygon;
|
|
3612
3768
|
/**
|
|
3613
|
-
*
|
|
3769
|
+
*
|
|
3614
3770
|
* @param elementType 'regularpolygon'
|
|
3615
|
-
* @param parents
|
|
3616
|
-
* @param attributes
|
|
3771
|
+
* @param parents
|
|
3772
|
+
* @param attributes
|
|
3617
3773
|
*/
|
|
3618
3774
|
create(elementType: 'regularpolygon', parents: unknown[], attributes?: PolygonAttributes): Polygon;
|
|
3619
3775
|
/**
|
|
3620
|
-
*
|
|
3776
|
+
*
|
|
3621
3777
|
* @param elementType 'reflection'
|
|
3622
|
-
* @param parents
|
|
3623
|
-
* @param attributes
|
|
3778
|
+
* @param parents
|
|
3779
|
+
* @param attributes
|
|
3624
3780
|
*/
|
|
3625
3781
|
create(elementType: 'reflection', parents: unknown[], attributes?: ReflectionAttributes): Reflection;
|
|
3626
3782
|
/**
|
|
3627
|
-
*
|
|
3783
|
+
*
|
|
3628
3784
|
* @param elementType 'riemannsum'
|
|
3629
|
-
* @param parents
|
|
3630
|
-
* @param attributes
|
|
3785
|
+
* @param parents
|
|
3786
|
+
* @param attributes
|
|
3631
3787
|
*/
|
|
3632
3788
|
create(elementType: 'riemannsum', parents: unknown[], attributes?: CurveAttributes): Riemannsum;
|
|
3633
3789
|
/**
|
|
3634
|
-
*
|
|
3790
|
+
*
|
|
3635
3791
|
* @param elementType 'sector'
|
|
3636
|
-
* @param parents
|
|
3637
|
-
* @param attributes
|
|
3792
|
+
* @param parents
|
|
3793
|
+
* @param attributes
|
|
3638
3794
|
*/
|
|
3639
3795
|
create(elementType: 'sector', parents: unknown[], attributes?: SectorAttributes): Sector;
|
|
3640
3796
|
/**
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3797
|
+
*
|
|
3798
|
+
* @param elementType 'semicircle'
|
|
3799
|
+
* @param parents
|
|
3800
|
+
* @param attributes
|
|
3801
|
+
*/
|
|
3802
|
+
create(elementType: 'semicircle', parents: unknown[], attributes?: SemicircleAttributes): Semicircle;
|
|
3803
|
+
/**
|
|
3804
|
+
*
|
|
3805
|
+
* @param elementType 'segment'
|
|
3806
|
+
* @param parents
|
|
3807
|
+
* @param attributes
|
|
3808
|
+
*/
|
|
3646
3809
|
create(elementType: 'segment', parents: unknown[], attributes?: SegmentAttributes): Segment;
|
|
3647
3810
|
/**
|
|
3648
|
-
*
|
|
3811
|
+
*
|
|
3649
3812
|
* @param elementType 'slider'
|
|
3650
|
-
* @param parents
|
|
3651
|
-
* @param attributes
|
|
3813
|
+
* @param parents
|
|
3814
|
+
* @param attributes
|
|
3652
3815
|
*/
|
|
3653
3816
|
create(elementType: 'slider', parents: unknown[], attributes?: SliderAttributes): Slider;
|
|
3654
3817
|
/**
|
|
3655
|
-
*
|
|
3818
|
+
*
|
|
3656
3819
|
* @param elementType 'slopetriangle'
|
|
3657
|
-
* @param parents
|
|
3658
|
-
* @param attributes
|
|
3820
|
+
* @param parents
|
|
3821
|
+
* @param attributes
|
|
3659
3822
|
*/
|
|
3660
3823
|
create(elementType: 'slopetriangle', parents: unknown[], attributes?: SlopetriangleAttributes): Slopetriangle;
|
|
3661
3824
|
/**
|
|
3662
|
-
*
|
|
3825
|
+
*
|
|
3663
3826
|
* @param elementType 'stepfunction'
|
|
3664
|
-
* @param parents
|
|
3665
|
-
* @param attributes
|
|
3827
|
+
* @param parents
|
|
3828
|
+
* @param attributes
|
|
3666
3829
|
*/
|
|
3667
3830
|
create(elementType: 'stepfunction', parents: unknown[], attributes?: StepfunctionAttributes): Stepfunction;
|
|
3668
3831
|
/**
|
|
3669
|
-
*
|
|
3832
|
+
*
|
|
3670
3833
|
* @param elementType 'tangent'
|
|
3671
|
-
* @param parents
|
|
3672
|
-
* @param attributes
|
|
3834
|
+
* @param parents
|
|
3835
|
+
* @param attributes
|
|
3673
3836
|
*/
|
|
3674
3837
|
create(elementType: 'tangent', parents: unknown[], attributes?: TangentAttributes): Tangent;
|
|
3675
3838
|
/**
|
|
3676
|
-
*
|
|
3839
|
+
*
|
|
3677
3840
|
* @param elementType 'tapemeasure'
|
|
3678
|
-
* @param parents
|
|
3679
|
-
* @param attributes
|
|
3841
|
+
* @param parents
|
|
3842
|
+
* @param attributes
|
|
3680
3843
|
*/
|
|
3681
3844
|
create(elementType: 'tapemeasure', parents?: unknown[], attributes?: TapemeasureAttributes): Tapemeasure;
|
|
3682
3845
|
/**
|
|
3683
|
-
*
|
|
3846
|
+
*
|
|
3684
3847
|
* @param elementType 'text'
|
|
3685
|
-
* @param parents
|
|
3686
|
-
* @param attributes
|
|
3848
|
+
* @param parents
|
|
3849
|
+
* @param attributes
|
|
3687
3850
|
*/
|
|
3688
3851
|
create(elementType: 'text', parents: unknown[], attributes?: TextAttributes): Text;
|
|
3689
3852
|
/**
|
|
3690
|
-
*
|
|
3853
|
+
*
|
|
3691
3854
|
* @param elementType 'ticks'
|
|
3692
|
-
* @param parents
|
|
3693
|
-
* @param attributes
|
|
3855
|
+
* @param parents
|
|
3856
|
+
* @param attributes
|
|
3694
3857
|
*/
|
|
3695
3858
|
create(elementType: 'ticks', parents: unknown[], attributes?: TicksAttributes): Ticks;
|
|
3696
3859
|
/**
|
|
3697
|
-
*
|
|
3860
|
+
*
|
|
3698
3861
|
* @param elementType 'tracecurve'
|
|
3699
|
-
* @param parents
|
|
3700
|
-
* @param attributes
|
|
3862
|
+
* @param parents
|
|
3863
|
+
* @param attributes
|
|
3701
3864
|
*/
|
|
3702
3865
|
create(elementType: 'tracecurve', parents: unknown[], attributes?: TracecurveAttributes): Tracecurve;
|
|
3703
3866
|
/**
|
|
3704
|
-
*
|
|
3867
|
+
*
|
|
3705
3868
|
* @param elementType 'transform'
|
|
3706
|
-
* @param parents
|
|
3707
|
-
* @param attributes
|
|
3869
|
+
* @param parents
|
|
3870
|
+
* @param attributes
|
|
3708
3871
|
*/
|
|
3709
3872
|
create(elementType: 'transform', parents: unknown[], attributes?: TransformationAttributes): Transformation;
|
|
3710
3873
|
/**
|
|
@@ -3715,13 +3878,13 @@ declare module JXG {
|
|
|
3715
3878
|
*/
|
|
3716
3879
|
create(elementType: 'turtle', parents?: unknown[], attributes?: TurtleAttributes): Turtle;
|
|
3717
3880
|
/**
|
|
3718
|
-
* @param c1
|
|
3719
|
-
* @param c2
|
|
3720
|
-
* @param start_c1
|
|
3721
|
-
* @param stepsize
|
|
3722
|
-
* @param direction
|
|
3723
|
-
* @param time
|
|
3724
|
-
* @param pointlist
|
|
3881
|
+
* @param c1
|
|
3882
|
+
* @param c2
|
|
3883
|
+
* @param start_c1
|
|
3884
|
+
* @param stepsize
|
|
3885
|
+
* @param direction
|
|
3886
|
+
* @param time
|
|
3887
|
+
* @param pointlist
|
|
3725
3888
|
*/
|
|
3726
3889
|
createRoulette(c1: Curve, c2: Curve, start_c1: number, stepsize: number, direction: number, time: number, pointlist: Point[]): unknown;
|
|
3727
3890
|
/**
|
|
@@ -3774,10 +3937,10 @@ declare module JXG {
|
|
|
3774
3937
|
* For a list of possible events see documentation of the elements and objects
|
|
3775
3938
|
* implementing the EventEmitter interface.
|
|
3776
3939
|
* @method on
|
|
3777
|
-
* param event {string}
|
|
3778
|
-
* param handler {()=>void}
|
|
3779
|
-
* param context [{}] The context the handler will be called in, default is the element itself.
|
|
3780
|
-
*
|
|
3940
|
+
* @param event {string}
|
|
3941
|
+
* @param handler {()=>void}
|
|
3942
|
+
* @param context [{}] The context the handler will be called in, default is the element itself.
|
|
3943
|
+
* @returns Reference to the object.
|
|
3781
3944
|
*/
|
|
3782
3945
|
on(event: string, handler: (evt: PointerEvent) => void, context?: {}): {};
|
|
3783
3946
|
pointerDownListener(event: unknown, object: unknown): boolean;
|
|
@@ -3794,11 +3957,11 @@ declare module JXG {
|
|
|
3794
3957
|
removeMouseEventHandlers(): unknown;
|
|
3795
3958
|
/**
|
|
3796
3959
|
* Removes object from board and renderer.
|
|
3797
|
-
*
|
|
3960
|
+
*
|
|
3798
3961
|
* Performance hints: It is recommended to use the object's id.
|
|
3799
3962
|
* If many elements are removed, it is best to call board.suspendUpdate() before looping through the elements to be removed and call board.unsuspendUpdate() after the loop.
|
|
3800
3963
|
* Further, it is advisable to loop in reverse order, i.e. remove the object in reverse order of their creation time.
|
|
3801
|
-
*
|
|
3964
|
+
*
|
|
3802
3965
|
* @param object The object to remove or array of objects to be removed. The element(s) is/are given by name, id or a reference.
|
|
3803
3966
|
* @param saveMethod If true, the algorithm runs through all elements and tests if the element to be deleted is a child element. If yes, it will be removed from the list of child elements. If false (default), the element is removed from the lists of child elements of all its ancestors. This should be much faster.
|
|
3804
3967
|
* @returns Reference to the board.
|
|
@@ -3816,7 +3979,7 @@ declare module JXG {
|
|
|
3816
3979
|
/**
|
|
3817
3980
|
*
|
|
3818
3981
|
*/
|
|
3819
|
-
setBoundingBox(bbox: [number, number, number, number], keepaspectratio?: boolean): this;
|
|
3982
|
+
setBoundingBox(bbox: [number, number, number, number], keepaspectratio?: boolean, setZoom?: string): this;
|
|
3820
3983
|
setId(object: unknown, type: number): string;
|
|
3821
3984
|
/**
|
|
3822
3985
|
*
|
|
@@ -3848,7 +4011,7 @@ declare module JXG {
|
|
|
3848
4011
|
unsuspendUpdate(): this;
|
|
3849
4012
|
/**
|
|
3850
4013
|
* Runs through most elements and calls their update() method and update the conditions.
|
|
3851
|
-
* param drag Element that caused the update.
|
|
4014
|
+
* @param drag Element that caused the update.
|
|
3852
4015
|
* return Reference to the board
|
|
3853
4016
|
*/
|
|
3854
4017
|
update(drag?: GeometryElement): this;
|
|
@@ -3870,34 +4033,61 @@ declare module JXG {
|
|
|
3870
4033
|
zoomAllPoints(): this;
|
|
3871
4034
|
/**
|
|
3872
4035
|
* Reset the bounding box and the zoom level to 100% such that a given set of elements is within the board's viewport.
|
|
3873
|
-
* @param elements
|
|
4036
|
+
* @param elements
|
|
3874
4037
|
*/
|
|
3875
4038
|
zoomElements(elements: unknown[]): this;
|
|
3876
4039
|
/**
|
|
3877
4040
|
* Zooms into the board by the factors board.attr.zoom.factorX and board.attr.zoom.factorY and applies the zoom.
|
|
3878
4041
|
* The zoom operation is centered at x, y.
|
|
3879
|
-
* @param x
|
|
3880
|
-
* @param y
|
|
4042
|
+
* @param x
|
|
4043
|
+
* @param y
|
|
3881
4044
|
*/
|
|
3882
4045
|
zoomIn(x?: number, y?: number): this;
|
|
3883
4046
|
/**
|
|
3884
4047
|
* Zooms out of the board by the factors board.attr.zoom.factorX and board.attr.zoom.factorY and applies the zoom.
|
|
3885
4048
|
* The zoom operation is centered at x, y.
|
|
3886
|
-
* @param x
|
|
3887
|
-
* @param y
|
|
4049
|
+
* @param x
|
|
4050
|
+
* @param y
|
|
3888
4051
|
*/
|
|
3889
4052
|
zoomOut(x?: number, y?: number): this;
|
|
3890
4053
|
}
|
|
3891
4054
|
|
|
3892
4055
|
export interface ZoomOptions {
|
|
4056
|
+
/**
|
|
4057
|
+
* Horizontal zoom factor (multiplied to Board.zoomX).
|
|
4058
|
+
*/
|
|
3893
4059
|
factorX?: number;
|
|
4060
|
+
/**
|
|
4061
|
+
* Vertical zoom factor (multiplied to Board.zoomY).
|
|
4062
|
+
*/
|
|
3894
4063
|
factorY?: number;
|
|
4064
|
+
/**
|
|
4065
|
+
* Allow zooming by mouse wheel or by pinch-to-zoom gesture on touch devices.
|
|
4066
|
+
*/
|
|
3895
4067
|
wheel?: boolean;
|
|
4068
|
+
/**
|
|
4069
|
+
* Mouse wheel zooming needs pressing of the Shift key.
|
|
4070
|
+
*/
|
|
3896
4071
|
needShift?: boolean;
|
|
4072
|
+
/**
|
|
4073
|
+
* Minimal values of Board.zoomX and Board.zoomY. Limits zoomOut.
|
|
4074
|
+
*/
|
|
3897
4075
|
min?: number;
|
|
4076
|
+
/**
|
|
4077
|
+
* Maximal values of Board.zoomX and Board.zoomY. Limits zoomIn.
|
|
4078
|
+
*/
|
|
3898
4079
|
max?: number;
|
|
4080
|
+
/**
|
|
4081
|
+
* Allow pinch-to-zoom to zoom only horizontal axis.
|
|
4082
|
+
*/
|
|
3899
4083
|
pinchHorizontal?: boolean;
|
|
4084
|
+
/**
|
|
4085
|
+
* Allow pinch-to-zoom to zoom only vertical axis.
|
|
4086
|
+
*/
|
|
3900
4087
|
pinchVertical?: boolean;
|
|
4088
|
+
/**
|
|
4089
|
+
* Sensitivity (in degrees) for recognizing horizontal or vertical pinch-to-zoom gestures.
|
|
4090
|
+
*/
|
|
3901
4091
|
pinchSensitivity?: number;
|
|
3902
4092
|
}
|
|
3903
4093
|
|
|
@@ -4186,7 +4376,7 @@ declare module JXG {
|
|
|
4186
4376
|
title: string;
|
|
4187
4377
|
|
|
4188
4378
|
/**
|
|
4189
|
-
*
|
|
4379
|
+
* Control the possibilities for zoom interaction.
|
|
4190
4380
|
*/
|
|
4191
4381
|
zoom: boolean | ZoomOptions;
|
|
4192
4382
|
|
|
@@ -4327,6 +4517,7 @@ declare module JXG {
|
|
|
4327
4517
|
display?: 'html' | 'internal';
|
|
4328
4518
|
dragArea?: 'all' | 'small';
|
|
4329
4519
|
fontSize?: number;
|
|
4520
|
+
highlight?: boolean;
|
|
4330
4521
|
highlightCssClass?: string;
|
|
4331
4522
|
highlightCssDefaultStyle?: string;
|
|
4332
4523
|
highlightCssStyle?: string;
|
|
@@ -4369,91 +4560,95 @@ declare module JXG {
|
|
|
4369
4560
|
|
|
4370
4561
|
export interface JXGOptions {
|
|
4371
4562
|
// TODO: These should all be XyzOptions, even if XyzOptions extends XyzAttributes (or converse).
|
|
4372
|
-
angle
|
|
4373
|
-
arc
|
|
4374
|
-
arrow
|
|
4375
|
-
axis
|
|
4376
|
-
bisector
|
|
4377
|
-
bisectorlines
|
|
4563
|
+
angle: AngleOptions;
|
|
4564
|
+
arc: ArcAttributes;
|
|
4565
|
+
arrow: ArrowAttributes;
|
|
4566
|
+
axis: AxisAttributes;
|
|
4567
|
+
bisector: BisectorAttributes;
|
|
4568
|
+
bisectorlines: {
|
|
4378
4569
|
line1?: BisectorAttributes;
|
|
4379
4570
|
line2?: BisectorAttributes;
|
|
4380
4571
|
}
|
|
4381
|
-
board
|
|
4382
|
-
button
|
|
4383
|
-
cardinalspline
|
|
4384
|
-
chart
|
|
4385
|
-
checkbox
|
|
4386
|
-
circle
|
|
4387
|
-
circumcircle
|
|
4388
|
-
circumcirclearc
|
|
4389
|
-
circumcirclesector
|
|
4390
|
-
comb
|
|
4391
|
-
conic
|
|
4392
|
-
curve
|
|
4393
|
-
elements
|
|
4394
|
-
glider
|
|
4395
|
-
grid
|
|
4396
|
-
group
|
|
4397
|
-
jc
|
|
4572
|
+
board: Partial<BoardAttributes>;
|
|
4573
|
+
button: ButtonAttributes;
|
|
4574
|
+
cardinalspline: CardinalsplineAttributes;
|
|
4575
|
+
chart: ChartAttributes;
|
|
4576
|
+
checkbox: CheckboxAttributes;
|
|
4577
|
+
circle: CircleOptions;
|
|
4578
|
+
circumcircle: CircumcircleOptions;
|
|
4579
|
+
circumcirclearc: CircumcircleArcOptions;
|
|
4580
|
+
circumcirclesector: CircumcircleSectorOptions;
|
|
4581
|
+
comb: CombOptions;
|
|
4582
|
+
conic: ConicOptions;
|
|
4583
|
+
curve: CurveOptions;
|
|
4584
|
+
elements: GeometryElementAttributes;
|
|
4585
|
+
glider: GliderOptions;
|
|
4586
|
+
grid: GridOptions;
|
|
4587
|
+
group: GroupOptions;
|
|
4588
|
+
jc: {
|
|
4398
4589
|
enabled?: boolean;
|
|
4399
4590
|
compile?: boolean;
|
|
4400
4591
|
};
|
|
4401
|
-
hatch
|
|
4402
|
-
htmlslider
|
|
4403
|
-
image
|
|
4404
|
-
incircle
|
|
4405
|
-
inequality
|
|
4406
|
-
infobox
|
|
4407
|
-
integral
|
|
4408
|
-
input
|
|
4409
|
-
intersection
|
|
4410
|
-
label
|
|
4592
|
+
hatch: HatchAttributes;
|
|
4593
|
+
htmlslider: SliderOptions;
|
|
4594
|
+
image: ImageOptions;
|
|
4595
|
+
incircle: IncircleOptions;
|
|
4596
|
+
inequality: InequalityOptions;
|
|
4597
|
+
infobox: InfoboxOptions;
|
|
4598
|
+
integral: IntegralOptions;
|
|
4599
|
+
input: InputOptions;
|
|
4600
|
+
intersection: IntersectionOptions;
|
|
4601
|
+
label: LabelOptions;
|
|
4411
4602
|
/**
|
|
4412
4603
|
* Default ordering of the layers.
|
|
4413
4604
|
*/
|
|
4414
|
-
layer
|
|
4415
|
-
legend
|
|
4416
|
-
line
|
|
4417
|
-
locus
|
|
4418
|
-
metapostspline
|
|
4419
|
-
mirrorelement
|
|
4605
|
+
layer: LayerOptions;
|
|
4606
|
+
legend: LegendOptions;
|
|
4607
|
+
line: LineOptions;
|
|
4608
|
+
locus: LocusOptions;
|
|
4609
|
+
metapostspline: CardinalsplineOptions;
|
|
4610
|
+
mirrorelement: MirrorelementOptions;
|
|
4420
4611
|
/**
|
|
4421
4612
|
* Options that are used by the navigation bar.
|
|
4422
4613
|
*/
|
|
4423
|
-
navbar
|
|
4424
|
-
normal
|
|
4425
|
-
orthogonalprojection
|
|
4426
|
-
parallel
|
|
4427
|
-
perpendicular
|
|
4428
|
-
perpendicularsegment
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4614
|
+
navbar: NavbarOptions;
|
|
4615
|
+
normal: NormalOptions;
|
|
4616
|
+
orthogonalprojection: OrthogonalprojectionOptions;
|
|
4617
|
+
parallel: ParallelOptions;
|
|
4618
|
+
perpendicular: PerpendicularOptions;
|
|
4619
|
+
perpendicularsegment: PerpendicularSegmentOptions;
|
|
4620
|
+
/**
|
|
4621
|
+
*
|
|
4622
|
+
*/
|
|
4623
|
+
point: PointOptions;
|
|
4624
|
+
polygon: PolygonOptions;
|
|
4625
|
+
polygonalchain: PolygonalChainOptions;
|
|
4432
4626
|
/**
|
|
4433
4627
|
* Precision options.
|
|
4434
4628
|
*/
|
|
4435
|
-
precision
|
|
4436
|
-
prescribedangle
|
|
4437
|
-
reflection
|
|
4438
|
-
regularpolygon
|
|
4439
|
-
riemannsum
|
|
4440
|
-
sector
|
|
4441
|
-
segment
|
|
4442
|
-
semicircle
|
|
4443
|
-
slider
|
|
4629
|
+
precision: PrecisionOptions;
|
|
4630
|
+
prescribedangle: PrescribedAngleOptions;
|
|
4631
|
+
reflection: ReflectionOptions;
|
|
4632
|
+
regularpolygon: RegularPolygonOptions;
|
|
4633
|
+
riemannsum: RiemannsumOptions;
|
|
4634
|
+
sector: SectorOptions;
|
|
4635
|
+
segment: SegmentOptions;
|
|
4636
|
+
semicircle: SemicircleOptions;
|
|
4637
|
+
slider: SliderOptions;
|
|
4444
4638
|
/**
|
|
4445
4639
|
* Abbreviations of properties.
|
|
4446
4640
|
*/
|
|
4447
|
-
shortcuts
|
|
4448
|
-
slopetriangle
|
|
4449
|
-
stepfunction
|
|
4641
|
+
shortcuts: {};
|
|
4642
|
+
slopetriangle: SlopetriangleOptions;
|
|
4643
|
+
stepfunction: StepfunctionOptions;
|
|
4450
4644
|
takeSizeFromFile?: boolean;
|
|
4451
|
-
tapemeasure
|
|
4452
|
-
ticks
|
|
4453
|
-
text
|
|
4454
|
-
tracecurve
|
|
4455
|
-
turtle
|
|
4645
|
+
tapemeasure: TapemeasureOptions;
|
|
4646
|
+
ticks: TicksOptions;
|
|
4647
|
+
text: TextOptions;
|
|
4648
|
+
tracecurve: TracecurveOptions;
|
|
4649
|
+
turtle: TurtleOptions;
|
|
4456
4650
|
}
|
|
4651
|
+
|
|
4457
4652
|
/**
|
|
4458
4653
|
*
|
|
4459
4654
|
*/
|
|
@@ -4478,10 +4673,10 @@ declare module JXG {
|
|
|
4478
4673
|
*/
|
|
4479
4674
|
export interface Math {
|
|
4480
4675
|
/**
|
|
4481
|
-
* Functional version of binary operator &&
|
|
4482
|
-
* param a.
|
|
4483
|
-
* param b.
|
|
4484
|
-
* returns Boolean value of a && b.
|
|
4676
|
+
* Functional version of binary operator &&
|
|
4677
|
+
* @param a.
|
|
4678
|
+
* @param b.
|
|
4679
|
+
* @returns Boolean value of a && b.
|
|
4485
4680
|
*/
|
|
4486
4681
|
and(a: boolean, b: boolean): boolean;
|
|
4487
4682
|
/**
|
|
@@ -4492,49 +4687,49 @@ declare module JXG {
|
|
|
4492
4687
|
/**
|
|
4493
4688
|
* Hyperbolic arc-cosine of a number.
|
|
4494
4689
|
*
|
|
4495
|
-
* param x
|
|
4690
|
+
* @param x
|
|
4496
4691
|
*/
|
|
4497
4692
|
acosh(x: number): number;
|
|
4498
4693
|
/**
|
|
4499
4694
|
* Hyperbolic arcsine of a number.
|
|
4500
4695
|
*
|
|
4501
|
-
* param x
|
|
4696
|
+
* @param x
|
|
4502
4697
|
*/
|
|
4503
4698
|
asinh(x: number): number;
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4699
|
+
/**
|
|
4700
|
+
* Computes the binomial coefficient n over k.
|
|
4701
|
+
* @param n
|
|
4702
|
+
* @param k
|
|
4703
|
+
*/
|
|
4509
4704
|
binomial(n: number, k: number): number;
|
|
4510
4705
|
/**
|
|
4511
4706
|
* Computes the hyperbolic cosine of x.
|
|
4512
|
-
* param x
|
|
4707
|
+
* @param x
|
|
4513
4708
|
*/
|
|
4514
4709
|
cosh(x: number): number;
|
|
4515
4710
|
/**
|
|
4516
|
-
* Functional version of binary operator ===
|
|
4517
|
-
* param a.
|
|
4518
|
-
* param b.
|
|
4519
|
-
* returns Boolean value of a === b.
|
|
4711
|
+
* Functional version of binary operator ===
|
|
4712
|
+
* @param a.
|
|
4713
|
+
* @param b.
|
|
4714
|
+
* @returns Boolean value of a === b.
|
|
4520
4715
|
*/
|
|
4521
4716
|
eq(a: number, b: number): boolean;
|
|
4522
4717
|
/**
|
|
4523
4718
|
* Error function
|
|
4524
4719
|
*
|
|
4525
|
-
* param x
|
|
4720
|
+
* @param x
|
|
4526
4721
|
*/
|
|
4527
4722
|
erf(x: number): number;
|
|
4528
4723
|
/**
|
|
4529
4724
|
* Complementary error function
|
|
4530
4725
|
*
|
|
4531
|
-
* param x
|
|
4726
|
+
* @param x
|
|
4532
4727
|
*/
|
|
4533
4728
|
erfc(x: number): number;
|
|
4534
4729
|
/**
|
|
4535
4730
|
* Inverse error function
|
|
4536
4731
|
*
|
|
4537
|
-
* param x
|
|
4732
|
+
* @param x
|
|
4538
4733
|
*/
|
|
4539
4734
|
erfi(x: number): number;
|
|
4540
4735
|
/**
|
|
@@ -4546,23 +4741,23 @@ declare module JXG {
|
|
|
4546
4741
|
/**
|
|
4547
4742
|
* Greatest common divisor (gcd) of two numbers.
|
|
4548
4743
|
*
|
|
4549
|
-
* param a.
|
|
4550
|
-
* param b.
|
|
4551
|
-
* returns gcd(a, b) if a and b are numbers, NaN else.
|
|
4744
|
+
* @param a.
|
|
4745
|
+
* @param b.
|
|
4746
|
+
* @returns gcd(a, b) if a and b are numbers, NaN else.
|
|
4552
4747
|
*/
|
|
4553
4748
|
gcd(a: number, b: number): number;
|
|
4554
4749
|
/**
|
|
4555
|
-
* Functional version of binary operator >=
|
|
4556
|
-
* param a.
|
|
4557
|
-
* param b.
|
|
4558
|
-
* returns Boolean value of a >= b.
|
|
4750
|
+
* Functional version of binary operator >=
|
|
4751
|
+
* @param a.
|
|
4752
|
+
* @param b.
|
|
4753
|
+
* @returns Boolean value of a >= b.
|
|
4559
4754
|
*/
|
|
4560
4755
|
geq(a: number, b: number): boolean;
|
|
4561
4756
|
/**
|
|
4562
|
-
* Functional version of binary operator >
|
|
4563
|
-
* param a.
|
|
4564
|
-
* param b.
|
|
4565
|
-
* returns Boolean value of a > b.
|
|
4757
|
+
* Functional version of binary operator >
|
|
4758
|
+
* @param a.
|
|
4759
|
+
* @param b.
|
|
4760
|
+
* @returns Boolean value of a > b.
|
|
4566
4761
|
*/
|
|
4567
4762
|
gt(a: number, b: number): boolean;
|
|
4568
4763
|
/**
|
|
@@ -4572,91 +4767,91 @@ declare module JXG {
|
|
|
4572
4767
|
/**
|
|
4573
4768
|
* Least common multiple (lcm) of two numbers.
|
|
4574
4769
|
*
|
|
4575
|
-
* param a.
|
|
4576
|
-
* param b.
|
|
4577
|
-
* returns lcm(a, b) if a and b are numbers, NaN else.
|
|
4770
|
+
* @param a.
|
|
4771
|
+
* @param b.
|
|
4772
|
+
* @returns lcm(a, b) if a and b are numbers, NaN else.
|
|
4578
4773
|
*/
|
|
4579
4774
|
lcm(a: number, b: number): number;
|
|
4580
4775
|
/**
|
|
4581
|
-
* Functional version of binary operator <=
|
|
4582
|
-
* param a.
|
|
4583
|
-
* param b.
|
|
4584
|
-
* returns Boolean value of a <= b.
|
|
4776
|
+
* Functional version of binary operator <=
|
|
4777
|
+
* @param a.
|
|
4778
|
+
* @param b.
|
|
4779
|
+
* @returns Boolean value of a <= b.
|
|
4585
4780
|
*/
|
|
4586
4781
|
leq(a: number, b: number): boolean;
|
|
4587
4782
|
/**
|
|
4588
4783
|
* Logarithm to base 10.
|
|
4589
|
-
* param a.
|
|
4590
|
-
* returns logarithm of a to base 10.
|
|
4784
|
+
* @param a.
|
|
4785
|
+
* @returns logarithm of a to base 10.
|
|
4591
4786
|
*/
|
|
4592
4787
|
log10(a: number): number;
|
|
4593
4788
|
/**
|
|
4594
4789
|
* Logarithm to base 2.
|
|
4595
|
-
* param a.
|
|
4596
|
-
* returns logarithm of a to base 2.
|
|
4790
|
+
* @param a.
|
|
4791
|
+
* @returns logarithm of a to base 2.
|
|
4597
4792
|
*/
|
|
4598
4793
|
log2(a: number): number;
|
|
4599
4794
|
/**
|
|
4600
4795
|
* Functional version of binary operator <
|
|
4601
|
-
* param a.
|
|
4602
|
-
* param b.
|
|
4603
|
-
* returns Boolean value of a < b.
|
|
4796
|
+
* @param a.
|
|
4797
|
+
* @param b.
|
|
4798
|
+
* @returns Boolean value of a < b.
|
|
4604
4799
|
*/
|
|
4605
4800
|
lt(a: number, b: number): boolean;
|
|
4606
4801
|
/**
|
|
4607
4802
|
* Computes the product of the two matrices mat1*mat2.
|
|
4608
|
-
* param mat1 Two dimensional array of numbers.
|
|
4609
|
-
* param mat2 Two dimensional array of numbers.
|
|
4610
|
-
* returns Two dimensional Array of numbers containing result.
|
|
4803
|
+
* @param mat1 Two dimensional array of numbers.
|
|
4804
|
+
* @param mat2 Two dimensional array of numbers.
|
|
4805
|
+
* @returns Two dimensional Array of numbers containing result.
|
|
4611
4806
|
*/
|
|
4612
4807
|
matMatMult(mat1: number[][], mat2: number[][]): number[][];
|
|
4613
4808
|
/**
|
|
4614
4809
|
* Multiplies a vector vec to a matrix mat: mat * vec. The matrix is interpreted by this function as an array of rows.
|
|
4615
4810
|
* Please note: This function does not check if the dimensions match.
|
|
4616
|
-
* param mat Two dimensional array of numbers. The inner arrays describe the columns, the outer ones the matrix' rows.
|
|
4617
|
-
* param vec Array of numbers.
|
|
4618
|
-
* returns Array of numbers containing the result.
|
|
4811
|
+
* @param mat Two dimensional array of numbers. The inner arrays describe the columns, the outer ones the matrix' rows.
|
|
4812
|
+
* @param vec Array of numbers.
|
|
4813
|
+
* @returns Array of numbers containing the result.
|
|
4619
4814
|
*/
|
|
4620
4815
|
matVecMult(mat: number[][], vec: number[]): number[];
|
|
4621
4816
|
/**
|
|
4622
4817
|
* The Javascript implementation of the % operator returns the symmetric modulo.
|
|
4623
4818
|
* mod and "%" are both identical if a >= 0 and m >= 0 but the results differ if a or m < 0.
|
|
4624
|
-
* param a.
|
|
4625
|
-
* param m.
|
|
4626
|
-
* returns mathematical modulo a mod m.
|
|
4819
|
+
* @param a.
|
|
4820
|
+
* @param m.
|
|
4821
|
+
* @returns mathematical modulo a mod m.
|
|
4627
4822
|
*/
|
|
4628
4823
|
mod(a: number, m: number): number;
|
|
4629
4824
|
/**
|
|
4630
4825
|
* Normal distribution function
|
|
4631
4826
|
*
|
|
4632
|
-
* param x
|
|
4827
|
+
* @param x
|
|
4633
4828
|
*/
|
|
4634
4829
|
ndtr(x: number): number;
|
|
4635
4830
|
/**
|
|
4636
4831
|
* Inverse of normal distribution function
|
|
4637
4832
|
*
|
|
4638
|
-
* param x
|
|
4833
|
+
* @param x
|
|
4639
4834
|
*/
|
|
4640
4835
|
ndtri(x: number): number;
|
|
4641
4836
|
/**
|
|
4642
|
-
* Functional version of binary operator !==
|
|
4643
|
-
* param a.
|
|
4644
|
-
* param b.
|
|
4645
|
-
* returns Boolean value of a !== b.
|
|
4837
|
+
* Functional version of binary operator !==
|
|
4838
|
+
* @param a.
|
|
4839
|
+
* @param b.
|
|
4840
|
+
* @returns Boolean value of a !== b.
|
|
4646
4841
|
*/
|
|
4647
4842
|
neq(a: number, b: number): boolean;
|
|
4648
4843
|
/**
|
|
4649
|
-
* Functional version of unary operator !
|
|
4650
|
-
* param a.
|
|
4651
|
-
* param b.
|
|
4652
|
-
* returns Boolean value of !a.
|
|
4844
|
+
* Functional version of unary operator !
|
|
4845
|
+
* @param a.
|
|
4846
|
+
* @param b.
|
|
4847
|
+
* @returns Boolean value of !a.
|
|
4653
4848
|
*/
|
|
4654
4849
|
not(a: number): boolean;
|
|
4655
4850
|
/**
|
|
4656
4851
|
* Functional version of binary operator ||
|
|
4657
|
-
* param a.
|
|
4658
|
-
* param b.
|
|
4659
|
-
* returns Boolean value of a || b.
|
|
4852
|
+
* @param a.
|
|
4853
|
+
* @param b.
|
|
4854
|
+
* @returns Boolean value of a || b.
|
|
4660
4855
|
*/
|
|
4661
4856
|
or(a: boolean, b: boolean): boolean;
|
|
4662
4857
|
/**
|
|
@@ -4667,93 +4862,93 @@ declare module JXG {
|
|
|
4667
4862
|
pow(base: number, exponent: number): number;
|
|
4668
4863
|
/**
|
|
4669
4864
|
* Determine the relative difference between two numbers.
|
|
4670
|
-
* param a.
|
|
4671
|
-
* param b.
|
|
4672
|
-
* returns Relative difference between a and b: |a-b| / max(|a|, |b|).
|
|
4865
|
+
* @param a.
|
|
4866
|
+
* @param b.
|
|
4867
|
+
* @returns Relative difference between a and b: |a-b| / max(|a|, |b|).
|
|
4673
4868
|
*/
|
|
4674
4869
|
relDif(a: number, b: number): number;
|
|
4675
4870
|
/**
|
|
4676
4871
|
* Sine hyperbolicus of x.
|
|
4677
|
-
* param x The number the sine hyperbolicus will be calculated of.
|
|
4678
|
-
* returns Sine hyperbolicus of the given value.
|
|
4872
|
+
* @param x The number the sine hyperbolicus will be calculated of.
|
|
4873
|
+
* @returns Sine hyperbolicus of the given value.
|
|
4679
4874
|
*/
|
|
4680
4875
|
sinh(x: number): number;
|
|
4681
4876
|
/**
|
|
4682
4877
|
* A square & multiply algorithm to compute base to the power of exponent.
|
|
4683
4878
|
*
|
|
4684
|
-
* param base.
|
|
4685
|
-
* param exponent.
|
|
4686
|
-
* returns base to the power of exponent.
|
|
4879
|
+
* @param base.
|
|
4880
|
+
* @param exponent.
|
|
4881
|
+
* @returns base to the power of exponent.
|
|
4687
4882
|
*/
|
|
4688
4883
|
squampow(base: number, exponent: number): number;
|
|
4689
4884
|
/**
|
|
4690
4885
|
* Transposes a matrix given as a two dimensional array.
|
|
4691
|
-
* param M The matrix to be transposed.
|
|
4692
|
-
* returns The transpose of M.
|
|
4886
|
+
* @param M The matrix to be transposed.
|
|
4887
|
+
* @returns The transpose of M.
|
|
4693
4888
|
*/
|
|
4694
4889
|
transpose(M: number[][]): number[][];
|
|
4695
4890
|
/**
|
|
4696
|
-
* Functional version of a binary operator xor
|
|
4697
|
-
* param a.
|
|
4698
|
-
* param b.
|
|
4699
|
-
* returns Boolean value of a xor b.
|
|
4891
|
+
* Functional version of a binary operator xor
|
|
4892
|
+
* @param a.
|
|
4893
|
+
* @param b.
|
|
4894
|
+
* @returns Boolean value of a xor b.
|
|
4700
4895
|
*/
|
|
4701
4896
|
xor(a: boolean, b: boolean): boolean;
|
|
4702
4897
|
|
|
4703
|
-
/* -------------------------------------------------- */
|
|
4898
|
+
/* -------------------------------------------------- */
|
|
4704
4899
|
/**
|
|
4705
4900
|
* Inner product of two vectors a and b. n is the length of the vectors.
|
|
4706
|
-
* param a
|
|
4707
|
-
* param b
|
|
4708
|
-
* param n optional
|
|
4709
|
-
* returns Inner product of a and b.
|
|
4901
|
+
* @param a
|
|
4902
|
+
* @param b
|
|
4903
|
+
* @param n optional
|
|
4904
|
+
* @returns Inner product of a and b.
|
|
4710
4905
|
*/
|
|
4711
|
-
innerProduct(a: number[],
|
|
4906
|
+
innerProduct(a: number[], b: number[], n: number): number;
|
|
4712
4907
|
/**
|
|
4713
4908
|
* Cross product of two vectors a and b, both of length three.
|
|
4714
|
-
* param a
|
|
4715
|
-
* param b
|
|
4716
|
-
* returns Cross product of a and b.
|
|
4909
|
+
* @param a
|
|
4910
|
+
* @param b
|
|
4911
|
+
* @returns Cross product of a and b.
|
|
4717
4912
|
*/
|
|
4718
|
-
crossProduct(a: number[],
|
|
4913
|
+
crossProduct(a: number[], b: number[]): number;
|
|
4719
4914
|
/**
|
|
4720
4915
|
* Euclidean norm of vector a of length n.
|
|
4721
|
-
* param a
|
|
4722
|
-
* param n
|
|
4723
|
-
* returns Euclidean norm of a.
|
|
4916
|
+
* @param a
|
|
4917
|
+
* @param n
|
|
4918
|
+
* @returns Euclidean norm of a.
|
|
4724
4919
|
*/
|
|
4725
|
-
norm(a: number[], n number): number;
|
|
4920
|
+
norm(a: number[], n: number): number;
|
|
4726
4921
|
/**
|
|
4727
4922
|
* Computes the cotangent of x.
|
|
4728
|
-
* param x
|
|
4923
|
+
* @param x
|
|
4729
4924
|
*/
|
|
4730
4925
|
cot(x: number): number;
|
|
4731
4926
|
/**
|
|
4732
4927
|
* Computes the inverse of cotangent of x.
|
|
4733
|
-
* param x
|
|
4928
|
+
* @param x
|
|
4734
4929
|
*/
|
|
4735
4930
|
acot(x: number): number;
|
|
4736
4931
|
/**
|
|
4737
4932
|
* Compute n-th real root of a real number. n must be strictly positive integer.
|
|
4738
4933
|
* If n is odd, the real n-th root exists and is negative.
|
|
4739
4934
|
* For n even, for negative valuees of x NaN is returned.
|
|
4740
|
-
* param a
|
|
4741
|
-
* param n
|
|
4935
|
+
* @param a
|
|
4936
|
+
* @param n
|
|
4742
4937
|
*/
|
|
4743
4938
|
nthroot(a: number, n: number): number;
|
|
4744
4939
|
/**
|
|
4745
4940
|
* Computes cube root of real number.
|
|
4746
|
-
* param a
|
|
4941
|
+
* @param a
|
|
4747
4942
|
*/
|
|
4748
4943
|
cbrt(a: number): number;
|
|
4749
4944
|
/**
|
|
4750
4945
|
* Compute base to the power of the rational exponent m / n.
|
|
4751
4946
|
* This function first reduces the fraction m/n and then computes JXG.Math.pow(base, m/n).
|
|
4752
|
-
* param a
|
|
4947
|
+
* @param a
|
|
4753
4948
|
*/
|
|
4754
|
-
ratpow
|
|
4949
|
+
ratpow(base: number, m: number, n: number): number;
|
|
4755
4950
|
|
|
4756
|
-
/* -------------------------------------------------- */
|
|
4951
|
+
/* -------------------------------------------------- */
|
|
4757
4952
|
|
|
4758
4953
|
Clip: Clip;
|
|
4759
4954
|
Geometry: Geometry;
|
|
@@ -4784,15 +4979,15 @@ declare module JXG {
|
|
|
4784
4979
|
difference(subject: Circle | Curve | Polygon, clip: Circle | Curve | Polygon, board: Board): [number[], number[]];
|
|
4785
4980
|
/**
|
|
4786
4981
|
* Determine the intersection, union or difference of two closed paths.
|
|
4787
|
-
*
|
|
4982
|
+
*
|
|
4788
4983
|
* This is an implementation of the Greiner-Hormann algorithm, see Günther Greiner and Kai Hormann (1998).
|
|
4789
4984
|
* "Efficient clipping of arbitrary polygons".
|
|
4790
4985
|
* ACM Transactions on Graphics. 17 (2): 71–83. and Erich, L. Foster, and Kai Hormann, Kai, and Romeo Traaian Popa (2019), "Clipping simple polygons with degenerate intersections", Computers & Graphics:X, 2.
|
|
4791
|
-
*
|
|
4986
|
+
*
|
|
4792
4987
|
* It is assumed that the pathes are closed, whereby it does not matter if the last point indeed equals the first point.
|
|
4793
4988
|
* In contrast to the original Greiner-Hormann algorithm, this algorithm can cope with many degenerate cases.
|
|
4794
4989
|
* A degenerate case is a vertext of one path which is contained in the other path.
|
|
4795
|
-
*
|
|
4990
|
+
*
|
|
4796
4991
|
* Problematic are:
|
|
4797
4992
|
* degenerate cases where one path additionally has self-intersections
|
|
4798
4993
|
* differences with one path having self-intersections.
|
|
@@ -4842,16 +5037,24 @@ declare module JXG {
|
|
|
4842
5037
|
* @deprecated
|
|
4843
5038
|
*/
|
|
4844
5039
|
angle(A: Point | number[], B: Point | number[], C: Point | number[]): number;
|
|
5040
|
+
/**
|
|
5041
|
+
* Calculates the distance of a point to a line.
|
|
5042
|
+
* The point and line are given by homogeneous coordinates.
|
|
5043
|
+
* For lines this can be line.stdform.
|
|
5044
|
+
* @param point Homogeneous coordinates of a point.
|
|
5045
|
+
* @param line Homogeneous coordinates of a point.
|
|
5046
|
+
*/
|
|
5047
|
+
distPointLine(point: [C: number, A: number, B: number], line: [C: number, A: number, B: number]): number;
|
|
4845
5048
|
/**
|
|
4846
5049
|
* Calculates the internal angle defined by the three points A, B, C if you're going from A to C around B counterclockwise.
|
|
4847
5050
|
*/
|
|
4848
5051
|
rad(A: Point | number[], B: Point | number[], C: Point | number[]): number;
|
|
4849
5052
|
/**
|
|
4850
5053
|
* Calculates the angle defined by the three points A, B, C if you're going from A to C around B counterclockwise.
|
|
4851
|
-
* @param A
|
|
4852
|
-
* @param B
|
|
5054
|
+
* @param A
|
|
5055
|
+
* @param B
|
|
4853
5056
|
* @param C
|
|
4854
|
-
* @returns The angle in degrees.
|
|
5057
|
+
* @returns The angle in degrees.
|
|
4855
5058
|
*/
|
|
4856
5059
|
trueAngle(A: Point | [x: number, y: number], B: Point | [x: number, y: number], C: Point | [x: number, y: number]): number;
|
|
4857
5060
|
}
|
|
@@ -4880,9 +5083,9 @@ declare module JXG {
|
|
|
4880
5083
|
/**
|
|
4881
5084
|
* Solves a system of linear equations given by A and b using the Gauss-Jordan-elimination.
|
|
4882
5085
|
* The algorithm runs in-place. I.e. the entries of A and b are changed.
|
|
4883
|
-
* param A Square matrix represented by an array of rows, containing the coefficients of the linear equation system.
|
|
4884
|
-
* param b A vector containing the linear equation system's right hand side.
|
|
4885
|
-
* returns A vector that solves the linear equation system.
|
|
5086
|
+
* @param A Square matrix represented by an array of rows, containing the coefficients of the linear equation system.
|
|
5087
|
+
* @param b A vector containing the linear equation system's right hand side.
|
|
5088
|
+
* @returns A vector that solves the linear equation system.
|
|
4886
5089
|
*/
|
|
4887
5090
|
Gauss(A: number[][], b: number[]): number[];
|
|
4888
5091
|
|
|
@@ -4919,11 +5122,11 @@ declare module JXG {
|
|
|
4919
5122
|
/**
|
|
4920
5123
|
* Solve initial value problems numerically using Runge-Kutta-methods.
|
|
4921
5124
|
* See http://en.wikipedia.org/wiki/Runge-Kutta_methods for more information on the algorithm.
|
|
4922
|
-
* param butcher
|
|
4923
|
-
* param x0
|
|
4924
|
-
* param I
|
|
4925
|
-
* param N
|
|
4926
|
-
* param f
|
|
5125
|
+
* @param butcher
|
|
5126
|
+
* @param x0
|
|
5127
|
+
* @param I
|
|
5128
|
+
* @param N
|
|
5129
|
+
* @param f
|
|
4927
5130
|
* return An array of vectors describing the solution of the o.d.e. on the given interval I.
|
|
4928
5131
|
*/
|
|
4929
5132
|
rungeKutta(butcher: unknown, x0: number[], I: number[], N: number, f: unknown): number[][];
|