figureone 0.15.10 → 1.0.0
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/figureone.min.js +1 -1
- package/index.js +79167 -0
- package/package.json +15 -1
- package/types/index.d.ts +132 -0
- package/types/js/figure/Animation/Animation.d.ts +36 -0
- package/types/js/figure/Animation/AnimationBuilder.d.ts +173 -0
- package/types/js/figure/Animation/AnimationManager.d.ts +392 -0
- package/types/js/figure/Animation/AnimationStep/CustomStep.d.ts +99 -0
- package/types/js/figure/Animation/AnimationStep/DelayStep.d.ts +24 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/ColorAnimationStep.d.ts +203 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/OpacityAnimationStep.d.ts +220 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/PositionAnimationStep.d.ts +124 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/PulseAnimationStep.d.ts +137 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/PulseTransformAnimationStep.d.ts +52 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/RotationAnimationStep.d.ts +119 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/ScaleAnimationStep.d.ts +93 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/ScenarioAnimationStep.d.ts +204 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep/TransformAnimationStep.d.ts +163 -0
- package/types/js/figure/Animation/AnimationStep/ElementAnimationStep.d.ts +56 -0
- package/types/js/figure/Animation/AnimationStep/ParallelAnimationStep.d.ts +70 -0
- package/types/js/figure/Animation/AnimationStep/SerialAnimationStep.d.ts +84 -0
- package/types/js/figure/Animation/AnimationStep/TriggerStep.d.ts +106 -0
- package/types/js/figure/Animation/AnimationStep.d.ts +110 -0
- package/types/js/figure/DrawContext2D.d.ts +9 -0
- package/types/js/figure/DrawingObjects/DrawingObject.d.ts +45 -0
- package/types/js/figure/DrawingObjects/GLObject/GLObject.d.ts +146 -0
- package/types/js/figure/DrawingObjects/HTMLObject/HTMLObject.d.ts +29 -0
- package/types/js/figure/DrawingObjects/TextObject/TextObject.d.ts +94 -0
- package/types/js/figure/DrawingObjects/TextObject/glyphMeasures.d.ts +7 -0
- package/types/js/figure/DrawingObjects/VertexObject/VertexGeneric.d.ts +21 -0
- package/types/js/figure/DrawingObjects/VertexObject/VertexObject.d.ts +0 -0
- package/types/js/figure/DrawingObjects/VertexObject/VertexText.d.ts +34 -0
- package/types/js/figure/Element.d.ts +1212 -0
- package/types/js/figure/Equation/Elements/BaseAnnotationFunction.d.ts +118 -0
- package/types/js/figure/Equation/Elements/BaseEquationFunction.d.ts +20 -0
- package/types/js/figure/Equation/Elements/Bounds.d.ts +49 -0
- package/types/js/figure/Equation/Elements/Color.d.ts +7 -0
- package/types/js/figure/Equation/Elements/Container.d.ts +5 -0
- package/types/js/figure/Equation/Elements/Element.d.ts +95 -0
- package/types/js/figure/Equation/Elements/Fraction.d.ts +5 -0
- package/types/js/figure/Equation/Elements/Lines.d.ts +5 -0
- package/types/js/figure/Equation/Elements/Matrix.d.ts +5 -0
- package/types/js/figure/Equation/Elements/Offset.d.ts +5 -0
- package/types/js/figure/Equation/Elements/Scale.d.ts +5 -0
- package/types/js/figure/Equation/Equation.d.ts +984 -0
- package/types/js/figure/Equation/EquationForm.d.ts +139 -0
- package/types/js/figure/Equation/EquationFunctions.d.ts +3367 -0
- package/types/js/figure/Equation/EquationSymbols.d.ts +1646 -0
- package/types/js/figure/Equation/HTMLEquation.d.ts +56 -0
- package/types/js/figure/Equation/Symbols/AngleBracket.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/Arrow.d.ts +17 -0
- package/types/js/figure/Equation/Symbols/Bar.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/Box.d.ts +11 -0
- package/types/js/figure/Equation/Symbols/Brace.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/Bracket.d.ts +8 -0
- package/types/js/figure/Equation/Symbols/Division.d.ts +8 -0
- package/types/js/figure/Equation/Symbols/Integral.d.ts +7 -0
- package/types/js/figure/Equation/Symbols/Line.d.ts +5 -0
- package/types/js/figure/Equation/Symbols/Product.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/Radical.d.ts +9 -0
- package/types/js/figure/Equation/Symbols/SquareBracket.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/Strike.d.ts +8 -0
- package/types/js/figure/Equation/Symbols/Sum.d.ts +6 -0
- package/types/js/figure/Equation/Symbols/SymbolNew.d.ts +15 -0
- package/types/js/figure/Equation/Symbols/Vinculum.d.ts +6 -0
- package/types/js/figure/Figure.d.ts +711 -0
- package/types/js/figure/FigureCollections/Angle.d.ts +766 -0
- package/types/js/figure/FigureCollections/Axis.d.ts +517 -0
- package/types/js/figure/FigureCollections/Axis3.d.ts +118 -0
- package/types/js/figure/FigureCollections/Button.d.ts +195 -0
- package/types/js/figure/FigureCollections/EquationLabel.d.ts +77 -0
- package/types/js/figure/FigureCollections/FigureCollections.d.ts +122 -0
- package/types/js/figure/FigureCollections/Legend.d.ts +270 -0
- package/types/js/figure/FigureCollections/Line.d.ts +587 -0
- package/types/js/figure/FigureCollections/Plot.d.ts +558 -0
- package/types/js/figure/FigureCollections/PolyLine.d.ts +487 -0
- package/types/js/figure/FigureCollections/Rectangle.d.ts +235 -0
- package/types/js/figure/FigureCollections/SlideNavigator.d.ts +255 -0
- package/types/js/figure/FigureCollections/Slider.d.ts +155 -0
- package/types/js/figure/FigureCollections/Text.d.ts +307 -0
- package/types/js/figure/FigureCollections/Toggle.d.ts +185 -0
- package/types/js/figure/FigureCollections/Trace.d.ts +237 -0
- package/types/js/figure/FigurePrimitives/FigureElementPrimitive2DText.d.ts +119 -0
- package/types/js/figure/FigurePrimitives/FigureElementPrimitiveGLText.d.ts +94 -0
- package/types/js/figure/FigurePrimitives/FigureElementPrimitiveGesture.d.ts +536 -0
- package/types/js/figure/FigurePrimitives/FigureElementPrimitiveMorph.d.ts +175 -0
- package/types/js/figure/FigurePrimitives/FigurePrimitiveTypes.d.ts +788 -0
- package/types/js/figure/FigurePrimitives/FigurePrimitiveTypes2D.d.ts +1324 -0
- package/types/js/figure/FigurePrimitives/FigurePrimitiveTypes3D.d.ts +1105 -0
- package/types/js/figure/FigurePrimitives/FigurePrimitives.d.ts +173 -0
- package/types/js/figure/FigurePrimitives/Generic.d.ts +5 -0
- package/types/js/figure/FigurePrimitives/Text.d.ts +17 -0
- package/types/js/figure/FontManager.d.ts +113 -0
- package/types/js/figure/Gesture.d.ts +39 -0
- package/types/js/figure/Recorder/Recorder.d.ts +291 -0
- package/types/js/figure/Recorder/parseState.d.ts +3 -0
- package/types/js/figure/Recorder/recorder.worker.d.ts +1 -0
- package/types/js/figure/Recorder/state.d.ts +7 -0
- package/types/js/figure/SlideNavigator.d.ts +606 -0
- package/types/js/figure/TimeKeeper.d.ts +174 -0
- package/types/js/figure/geometries/arc.d.ts +18 -0
- package/types/js/figure/geometries/arrow.d.ts +215 -0
- package/types/js/figure/geometries/buffer.d.ts +4 -0
- package/types/js/figure/geometries/copy/copy.d.ts +178 -0
- package/types/js/figure/geometries/ellipse.d.ts +17 -0
- package/types/js/figure/geometries/line.d.ts +13 -0
- package/types/js/figure/geometries/lines/corners.d.ts +7 -0
- package/types/js/figure/geometries/lines/dashes.d.ts +23 -0
- package/types/js/figure/geometries/lines/lines.d.ts +31 -0
- package/types/js/figure/geometries/polygon/polygon.d.ts +12 -0
- package/types/js/figure/geometries/rectangle.d.ts +19 -0
- package/types/js/figure/geometries/triangle.d.ts +27 -0
- package/types/js/figure/webgl/Atlas.d.ts +42 -0
- package/types/js/figure/webgl/shaders.d.ts +143 -0
- package/types/js/figure/webgl/target.d.ts +9 -0
- package/types/js/figure/webgl/webgl.d.ts +54 -0
- package/types/js/tools/FunctionMap.d.ts +69 -0
- package/types/js/tools/color.d.ts +11 -0
- package/types/js/tools/colorNames.d.ts +2 -0
- package/types/js/tools/d2/polygon.d.ts +60 -0
- package/types/js/tools/d2/triangles.d.ts +0 -0
- package/types/js/tools/d3/cone.d.ts +57 -0
- package/types/js/tools/d3/cube.d.ts +26 -0
- package/types/js/tools/d3/cylinder.d.ts +45 -0
- package/types/js/tools/d3/line3.d.ts +55 -0
- package/types/js/tools/d3/prism.d.ts +49 -0
- package/types/js/tools/d3/revolve.d.ts +87 -0
- package/types/js/tools/d3/sphere.d.ts +33 -0
- package/types/js/tools/d3/surface.d.ts +47 -0
- package/types/js/tools/g2.d.ts +242 -0
- package/types/js/tools/geometry/Bounds.d.ts +446 -0
- package/types/js/tools/geometry/Line.d.ts +314 -0
- package/types/js/tools/geometry/Path.d.ts +67 -0
- package/types/js/tools/geometry/Plane.d.ts +201 -0
- package/types/js/tools/geometry/Point.d.ts +359 -0
- package/types/js/tools/geometry/Rect.d.ts +115 -0
- package/types/js/tools/geometry/Transform.d.ts +623 -0
- package/types/js/tools/geometry/angle.d.ts +105 -0
- package/types/js/tools/geometry/common.d.ts +9 -0
- package/types/js/tools/geometry/coordinates.d.ts +30 -0
- package/types/js/tools/geometry/deceleration.d.ts +13 -0
- package/types/js/tools/geometry/polygon.d.ts +4 -0
- package/types/js/tools/geometry/quaternion.d.ts +15 -0
- package/types/js/tools/geometry/scene.d.ts +282 -0
- package/types/js/tools/geometry/tools.d.ts +8 -0
- package/types/js/tools/geometry/types.d.ts +2 -0
- package/types/js/tools/getCssColors.d.ts +1 -0
- package/types/js/tools/getCssVariables.d.ts +4 -0
- package/types/js/tools/getImageData.d.ts +1 -0
- package/types/js/tools/getScssColors.d.ts +2 -0
- package/types/js/tools/htmlGenerator.d.ts +85 -0
- package/types/js/tools/m2.d.ts +24 -0
- package/types/js/tools/m3.d.ts +71 -0
- package/types/js/tools/math.d.ts +112 -0
- package/types/js/tools/morph.d.ts +651 -0
- package/types/js/tools/styleSheets.d.ts +3 -0
- package/types/js/tools/tools.d.ts +281 -0
- package/types/js/tools/types.d.ts +305 -0
- package/figureone.worker.js +0 -1
|
@@ -0,0 +1,1646 @@
|
|
|
1
|
+
import type { TypeBorder } from '../../tools/g2';
|
|
2
|
+
import FigurePrimitives from '../FigurePrimitives/FigurePrimitives';
|
|
3
|
+
import Bracket from './Symbols/Bracket';
|
|
4
|
+
import Box from './Symbols/Box';
|
|
5
|
+
import Brace from './Symbols/Brace';
|
|
6
|
+
import SquareBracket from './Symbols/SquareBracket';
|
|
7
|
+
import AngleBracket from './Symbols/AngleBracket';
|
|
8
|
+
import Bar from './Symbols/Bar';
|
|
9
|
+
import Sum from './Symbols/Sum';
|
|
10
|
+
import Product from './Symbols/Product';
|
|
11
|
+
import Integral from './Symbols/Integral';
|
|
12
|
+
import Arrow from './Symbols/Arrow';
|
|
13
|
+
import type { OBJ_LineArrows } from '../geometries/arrow';
|
|
14
|
+
import VinculumNew from './Symbols/Vinculum';
|
|
15
|
+
import Strike from './Symbols/Strike';
|
|
16
|
+
import Radical from './Symbols/Radical';
|
|
17
|
+
import Division from './Symbols/Division';
|
|
18
|
+
import Line from './Symbols/Line';
|
|
19
|
+
import type { TypeColor, TypeDash } from '../../tools/types';
|
|
20
|
+
/**
|
|
21
|
+
* Base object options for all equation symbols
|
|
22
|
+
*
|
|
23
|
+
* `isTouchable`, `touchBorder`, `color` and `onClick` change the corresponding
|
|
24
|
+
* properties on the {@link FigureElementPrimitive}, and could therefore also
|
|
25
|
+
* be set in `mods`. However, as these are commonly used, they are included in
|
|
26
|
+
* the root object for convenience.
|
|
27
|
+
* @interface
|
|
28
|
+
* @group Equation Symbols
|
|
29
|
+
*/
|
|
30
|
+
export type EQN_Symbol = {
|
|
31
|
+
color?: TypeColor;
|
|
32
|
+
isTouchable?: boolean;
|
|
33
|
+
touchBorder?: TypeBorder | 'border' | number | 'rect' | 'draw' | 'buffer';
|
|
34
|
+
onClick?: () => void | string | null;
|
|
35
|
+
mods?: Record<string, any>;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Vinculum symbol used in fractions ({@link EQN_Fraction} equation function).
|
|
39
|
+
*
|
|
40
|
+
* 
|
|
41
|
+
*
|
|
42
|
+
* <pre>
|
|
43
|
+
* width
|
|
44
|
+
* |<---------------------------------------->|
|
|
45
|
+
* | |
|
|
46
|
+
* | | ____
|
|
47
|
+
* 00000000000000000000000000000000000000000000 A
|
|
48
|
+
* 00000000000000000000000000000000000000000000 | lineWidth
|
|
49
|
+
* 00000000000000000000000000000000000000000000 __V_
|
|
50
|
+
*
|
|
51
|
+
* </pre>
|
|
52
|
+
* @property {'vinculum'} symbol
|
|
53
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
54
|
+
* @property {'static' | 'dynamic'} [draw] `'dynamic'` updates vertices on
|
|
55
|
+
* resize, `'static'` only changes scale transform (`'dynamic'`)
|
|
56
|
+
* @property {number | 'first'} [staticWidth] used when `draw`=`static`.
|
|
57
|
+
* `number` sets width of static symbol - `'first'` calculates and sets width
|
|
58
|
+
* based on first use (`'first'`)
|
|
59
|
+
*
|
|
60
|
+
* @extends EQN_Symbol
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* // Define as element
|
|
64
|
+
* figure.add({
|
|
65
|
+
* make: 'equation',
|
|
66
|
+
* elements: {
|
|
67
|
+
* v: { symbol: 'vinculum' },
|
|
68
|
+
* },
|
|
69
|
+
* forms: {
|
|
70
|
+
* form1: { frac: ['a', 'v', 'b'] },
|
|
71
|
+
* },
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* // Define inline simple one use
|
|
76
|
+
* figure.add({
|
|
77
|
+
* make: 'equation',
|
|
78
|
+
* forms: {
|
|
79
|
+
* form1: { frac: ['a', 'vinculum', 'b'] },
|
|
80
|
+
* },
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* // Define inline with reuse
|
|
85
|
+
* const eqn = figure.add({
|
|
86
|
+
* make: 'equation',
|
|
87
|
+
* forms: {
|
|
88
|
+
* form1: { frac: ['a', 'v1_vinculum', { frac: ['c', 'v2_vinculum', 'b'] }] },
|
|
89
|
+
* form2: { frac: [['a', 'ef'], 'v1', { frac: ['c', 'v2', 'd'] }] },
|
|
90
|
+
* },
|
|
91
|
+
* });
|
|
92
|
+
* eqn.animations.new()
|
|
93
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
94
|
+
* .start();
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* // Define inline with customization
|
|
98
|
+
* figure.add({
|
|
99
|
+
* make: 'equation',
|
|
100
|
+
* forms: {
|
|
101
|
+
* form1: { frac: ['a', { vinculum: { lineWidth: 0.004 } }, 'b'] },
|
|
102
|
+
* },
|
|
103
|
+
* });
|
|
104
|
+
* @interface
|
|
105
|
+
* @group Equation Symbols
|
|
106
|
+
*/
|
|
107
|
+
export type EQN_VinculumSymbol = {
|
|
108
|
+
symbol: 'vinculum';
|
|
109
|
+
lineWidth?: number;
|
|
110
|
+
draw?: 'static' | 'dynamic';
|
|
111
|
+
staticWidth?: number | 'first';
|
|
112
|
+
staticHeight?: number | 'first';
|
|
113
|
+
} & EQN_Symbol;
|
|
114
|
+
/**
|
|
115
|
+
* Box equation symbol used in {@link EQN_Box} and as a
|
|
116
|
+
* {@link EQN_EncompassGlyph}.
|
|
117
|
+
*
|
|
118
|
+
* 
|
|
119
|
+
*
|
|
120
|
+
*
|
|
121
|
+
* <pre>
|
|
122
|
+
* width
|
|
123
|
+
* |<--------------------------------------------------->|
|
|
124
|
+
* | |
|
|
125
|
+
* | |
|
|
126
|
+
*
|
|
127
|
+
* ------- 0000000000000000000000000000000000000000000000000000000
|
|
128
|
+
* A 0000000000000000000000000000000000000000000000000000000
|
|
129
|
+
* | 0000 0000
|
|
130
|
+
* | 0000 0000
|
|
131
|
+
* | 0000 0000
|
|
132
|
+
* height | 0000 0000
|
|
133
|
+
* | 0000 0000
|
|
134
|
+
* | 0000 0000
|
|
135
|
+
* | 0000 0000
|
|
136
|
+
* | 0000 0000
|
|
137
|
+
* | 0000000000000000000000000000000000000000000000000000000
|
|
138
|
+
* V______ 0000000000000000000000000000000000000000000000000000000
|
|
139
|
+
*
|
|
140
|
+
* </pre>
|
|
141
|
+
*
|
|
142
|
+
* @property {'box'} symbol
|
|
143
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
144
|
+
* @property {boolean} [fill] (`false`)
|
|
145
|
+
* @property {number} [width] force width instead of auto calculation
|
|
146
|
+
* @property {number} [height] force height instead of auto calculation
|
|
147
|
+
* @property {'static' | 'dynamic'} [draw] `'dynamic'` updates vertices on
|
|
148
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
149
|
+
* @property {number | 'first'} [staticWidth] used when `draw`=`static`.
|
|
150
|
+
* `number` sets width of static symbol - `'first'` calculates and sets width
|
|
151
|
+
* based on first use
|
|
152
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
153
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
154
|
+
* based on first use
|
|
155
|
+
*
|
|
156
|
+
* @extends EQN_Symbol
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* // Define in element
|
|
160
|
+
* figure.add({
|
|
161
|
+
* make: 'equation',
|
|
162
|
+
* elements: {
|
|
163
|
+
* b: { symbol: 'box', lineWidth: 0.008 },
|
|
164
|
+
* },
|
|
165
|
+
* forms: {
|
|
166
|
+
* form1: { box: ['a', 'b', true, 0.1] },
|
|
167
|
+
* },
|
|
168
|
+
* });
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* // Define inline simple one use
|
|
172
|
+
* figure.add({
|
|
173
|
+
* make: 'equation',
|
|
174
|
+
* forms: {
|
|
175
|
+
* form1: { box: ['a', 'box', true, 0.1] },
|
|
176
|
+
* },
|
|
177
|
+
* });
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* // Define inline with reuse
|
|
181
|
+
* const eqn = figure.add({
|
|
182
|
+
* make: 'equation',
|
|
183
|
+
* forms: {
|
|
184
|
+
* form1: { box: ['a', 'b_box', false, 0.1] },
|
|
185
|
+
* form2: { box: ['a', 'b', false, 0.2] },
|
|
186
|
+
* },
|
|
187
|
+
* });
|
|
188
|
+
* eqn.animations.new()
|
|
189
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
190
|
+
* .start();
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* // Define inline with customization
|
|
194
|
+
* figure.add({
|
|
195
|
+
* make: 'equation',
|
|
196
|
+
* forms: {
|
|
197
|
+
* form1: { box: ['a', { box: { lineWidth: 0.004 } }, true, 0.1] },
|
|
198
|
+
* },
|
|
199
|
+
* });
|
|
200
|
+
* @interface
|
|
201
|
+
* @group Equation Symbols
|
|
202
|
+
*/
|
|
203
|
+
export type EQN_BoxSymbol = {
|
|
204
|
+
symbol: 'box';
|
|
205
|
+
fill?: boolean;
|
|
206
|
+
width?: number;
|
|
207
|
+
height?: number;
|
|
208
|
+
lineWidth?: number;
|
|
209
|
+
draw?: 'static' | 'dynamic';
|
|
210
|
+
staticWidth?: number | 'first';
|
|
211
|
+
staticHeight?: number | 'first';
|
|
212
|
+
} & EQN_Symbol;
|
|
213
|
+
/**
|
|
214
|
+
* Arrow equation symbol.
|
|
215
|
+
*
|
|
216
|
+
* The arrow direction defines where it can be used:
|
|
217
|
+
* - `'left'`, `'right'`: {@link EQN_Bar} (top and bottom sides),
|
|
218
|
+
* {@link EQN_Comment}, and {@link EQN_LeftRightGlyph}
|
|
219
|
+
* - `'up'`, `'down'`: {@link EQN_Bracket}, {@link EQN_Bar} (left and right
|
|
220
|
+
* sides), and {@link EQN_TopBottomGlyph}
|
|
221
|
+
*
|
|
222
|
+
* Note, as the default direciton is `'right'`, using the inline definition of
|
|
223
|
+
* arrow will only work with {@link EQN_Bar} (top and bottom sides),
|
|
224
|
+
* {@link EQN_Comment}, and {@link EQN_LeftRightGlyph}.
|
|
225
|
+
*
|
|
226
|
+
* 
|
|
227
|
+
*
|
|
228
|
+
* <pre>
|
|
229
|
+
* arrowWidth
|
|
230
|
+
* |<--------------->|
|
|
231
|
+
* | |
|
|
232
|
+
* | |
|
|
233
|
+
* -------|------- 0 |
|
|
234
|
+
* A | 00000 |
|
|
235
|
+
* arrowHeight | | 0000000 |
|
|
236
|
+
* | | 00000000000 |
|
|
237
|
+
* V | 000000000000000 |
|
|
238
|
+
* ------ 0000000000000000000
|
|
239
|
+
* 0000000
|
|
240
|
+
* 0000000
|
|
241
|
+
* 0000000
|
|
242
|
+
* 0000000
|
|
243
|
+
* 0000000
|
|
244
|
+
* 0000000
|
|
245
|
+
* 0000000
|
|
246
|
+
* 0000000
|
|
247
|
+
* 0000000
|
|
248
|
+
* 0000000
|
|
249
|
+
* 0000000
|
|
250
|
+
* 0000000
|
|
251
|
+
* 0000000
|
|
252
|
+
* 0000000
|
|
253
|
+
* 0000000
|
|
254
|
+
* 0000000
|
|
255
|
+
* | |
|
|
256
|
+
* | |
|
|
257
|
+
* |<--->|
|
|
258
|
+
* lineWidth
|
|
259
|
+
* </pre>
|
|
260
|
+
* @property {'arrow'} symbol
|
|
261
|
+
* @property {'up' | 'down' | 'left' | 'right'} [direction] (`'right'`)
|
|
262
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
263
|
+
* @property {number} [arrowWidth] (`0.01`)
|
|
264
|
+
* @property {number} [arrowHeight] (`0.04`)
|
|
265
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
266
|
+
* @property {'static' | 'dynamic'} [draw] `'dynamic'` updates vertices on
|
|
267
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
268
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
269
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
270
|
+
* based on first use (`'first'`)
|
|
271
|
+
*
|
|
272
|
+
* @extends EQN_Symbol
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* // Define in element
|
|
276
|
+
* figure.add({
|
|
277
|
+
* make: 'equation',
|
|
278
|
+
* elements: {
|
|
279
|
+
* rightArrow: { symbol: 'arrow', direction: 'right' },
|
|
280
|
+
* },
|
|
281
|
+
* forms: {
|
|
282
|
+
* form1: { bar: ['a', 'rightArrow', false, 0.05, 0.03] },
|
|
283
|
+
* },
|
|
284
|
+
* });
|
|
285
|
+
*
|
|
286
|
+
* @example
|
|
287
|
+
* // Define inline simple one use
|
|
288
|
+
* figure.add({
|
|
289
|
+
* make: 'equation',
|
|
290
|
+
* forms: {
|
|
291
|
+
* form1: { bar: ['a', 'arrow', false, 0.05, 0.03] },
|
|
292
|
+
* },
|
|
293
|
+
* });
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* // Define inline with reuse
|
|
297
|
+
* const eqn = figure.add({
|
|
298
|
+
* make: 'equation',
|
|
299
|
+
* forms: {
|
|
300
|
+
* form1: { bar: ['a', 'ar_arrow', false, 0.05, 0] },
|
|
301
|
+
* form2: { bar: ['a', 'ar', false, 0.05, 0.1] },
|
|
302
|
+
* },
|
|
303
|
+
* });
|
|
304
|
+
* eqn.animations.new()
|
|
305
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
306
|
+
* .start();
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* // Define inline with customization
|
|
310
|
+
* figure.add({
|
|
311
|
+
* make: 'equation',
|
|
312
|
+
* forms: {
|
|
313
|
+
* form1: {
|
|
314
|
+
* bar: {
|
|
315
|
+
* content: 'a',
|
|
316
|
+
* side: 'left',
|
|
317
|
+
* symbol: { arrow: { direction: 'up' } },
|
|
318
|
+
* overhang: 0.1,
|
|
319
|
+
* },
|
|
320
|
+
* },
|
|
321
|
+
* },
|
|
322
|
+
* });
|
|
323
|
+
* @interface
|
|
324
|
+
* @group Equation Symbols
|
|
325
|
+
*/
|
|
326
|
+
export type EQN_ArrowSymbol = {
|
|
327
|
+
symbol: 'arrow';
|
|
328
|
+
direction?: 'up' | 'down' | 'left' | 'right';
|
|
329
|
+
lineWidth?: number;
|
|
330
|
+
arrowHeight?: number;
|
|
331
|
+
arrowWidth?: number;
|
|
332
|
+
draw?: 'static' | 'dynamic';
|
|
333
|
+
staticHeight?: number | 'first';
|
|
334
|
+
} & EQN_Symbol;
|
|
335
|
+
/**
|
|
336
|
+
* Sum equation symbol used with the {@link EQN_SumOf} equation function.
|
|
337
|
+
*
|
|
338
|
+
* 
|
|
339
|
+
*
|
|
340
|
+
* <pre>
|
|
341
|
+
* ---------- 00000000000000000000000000000000000
|
|
342
|
+
* A 0000000 000000
|
|
343
|
+
* | 0000000 000
|
|
344
|
+
* | 0000000 00
|
|
345
|
+
* | 0000000
|
|
346
|
+
* | 0000000
|
|
347
|
+
* | 0000000
|
|
348
|
+
* | 0000000
|
|
349
|
+
* | 0000000
|
|
350
|
+
* | 0000000
|
|
351
|
+
* | 0000000
|
|
352
|
+
* | 000000
|
|
353
|
+
* | 000
|
|
354
|
+
* | 0000
|
|
355
|
+
* height | 0000
|
|
356
|
+
* | 0000 \
|
|
357
|
+
* | 0000 \
|
|
358
|
+
* | 0000 lineWidth
|
|
359
|
+
* | 0000
|
|
360
|
+
* | 0000
|
|
361
|
+
* | 0000
|
|
362
|
+
* | 0000 00
|
|
363
|
+
* | 0000 000|
|
|
364
|
+
* | 0000 000000|
|
|
365
|
+
* V 000000000000000000000000000000000000 |
|
|
366
|
+
* -------- 000000000000000000000000000000000000 |
|
|
367
|
+
* | |
|
|
368
|
+
* | |
|
|
369
|
+
* | width |
|
|
370
|
+
* |<------------------------------------>|
|
|
371
|
+
* </pre>
|
|
372
|
+
* @property {'sum'} symbol
|
|
373
|
+
* @property {number} [lineWidth] (`height * 0.88 / (25 * height + 15)`)
|
|
374
|
+
* @property {number} [sides] number of sides that make up serif curve (`5`)
|
|
375
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
376
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
377
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
378
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
379
|
+
* based on first use (`'first'`)
|
|
380
|
+
*
|
|
381
|
+
* @extends EQN_Symbol
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* // Define in element
|
|
385
|
+
* figure.add({
|
|
386
|
+
* make: 'equation',
|
|
387
|
+
* elements: {
|
|
388
|
+
* sigma: { symbol: 'sum' },
|
|
389
|
+
* },
|
|
390
|
+
* forms: {
|
|
391
|
+
* form1: { sumOf: ['sigma', 'a', 'a = 0', 'n'] },
|
|
392
|
+
* },
|
|
393
|
+
* });
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* // Define inline simple one use
|
|
397
|
+
* figure.add({
|
|
398
|
+
* make: 'equation',
|
|
399
|
+
* forms: {
|
|
400
|
+
* form1: { sumOf: ['sum', 'a', 'a = 0', 'n'] },
|
|
401
|
+
* },
|
|
402
|
+
* });
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* // Define inline with reuse
|
|
406
|
+
* const eqn = figure.add({
|
|
407
|
+
* make: 'equation',
|
|
408
|
+
* forms: {
|
|
409
|
+
* form1: { sumOf: ['s1_sum', 'a', 'a = 0', 'n'] },
|
|
410
|
+
* form2: { sumOf: ['s1', 'a', 'a = 0', 'm'] },
|
|
411
|
+
* },
|
|
412
|
+
* });
|
|
413
|
+
* eqn.animations.new()
|
|
414
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
415
|
+
* .start();
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* // Define inline with customization
|
|
419
|
+
* figure.add({
|
|
420
|
+
* make: 'equation',
|
|
421
|
+
* forms: {
|
|
422
|
+
* form1: { sumOf: [{ sum: { lineWidth: 0.01 } }, 'a', 'a = 0', 'n'] },
|
|
423
|
+
* },
|
|
424
|
+
* });
|
|
425
|
+
* @interface
|
|
426
|
+
* @group Equation Symbols
|
|
427
|
+
*/
|
|
428
|
+
export type EQN_SumSymbol = {
|
|
429
|
+
symbol: 'sum';
|
|
430
|
+
lineWidth?: number;
|
|
431
|
+
sides?: number;
|
|
432
|
+
draw?: 'static' | 'dynamic';
|
|
433
|
+
staticHeight?: number | 'first';
|
|
434
|
+
} & EQN_Symbol;
|
|
435
|
+
/**
|
|
436
|
+
* Product equation symbol used with the {@link EQN_ProdOf} equation function.
|
|
437
|
+
*
|
|
438
|
+
* 
|
|
439
|
+
*
|
|
440
|
+
*
|
|
441
|
+
* <pre>
|
|
442
|
+
* width
|
|
443
|
+
* |<--------------------------------------------------------->|
|
|
444
|
+
* | |
|
|
445
|
+
* | |
|
|
446
|
+
* | |
|
|
447
|
+
* | lineWidth |
|
|
448
|
+
* | / |
|
|
449
|
+
* | / |
|
|
450
|
+
* ---- 00000000000000000000000000000000000000000000000000000000000000
|
|
451
|
+
* A 000000000000000000000000000000000000000000000000000000
|
|
452
|
+
* | 00000000000000000000000000000000000000000000000000
|
|
453
|
+
* | 00000000000 00000000000
|
|
454
|
+
* | 00000000000 00000000000
|
|
455
|
+
* | 00000000000 00000000000
|
|
456
|
+
* | 00000000000 00000000000
|
|
457
|
+
* | 00000000000 00000000000
|
|
458
|
+
* | 00000000000 00000000000
|
|
459
|
+
* | 00000000000 00000000000
|
|
460
|
+
* | 00000000000 00000000000
|
|
461
|
+
* | 00000000000 00000000000
|
|
462
|
+
* height | 00000000000 00000000000
|
|
463
|
+
* | 00000000000 00000000000
|
|
464
|
+
* | 00000000000 00000000000
|
|
465
|
+
* | 00000000000 00000000000
|
|
466
|
+
* | 00000000000 00000000000
|
|
467
|
+
* | 00000000000 00000000000
|
|
468
|
+
* | 00000000000 00000000000
|
|
469
|
+
* | 00000000000 00000000000
|
|
470
|
+
* | 00000000000 00000000000
|
|
471
|
+
* | 00000000000 00000000000
|
|
472
|
+
* | 00000000000 00000000000
|
|
473
|
+
* | 0000000000000 00000000000000
|
|
474
|
+
* V 00000000000000000 000000000000000000
|
|
475
|
+
* ----- 0000000000000000000000000 00000000000000000000000000
|
|
476
|
+
* </pre>
|
|
477
|
+
* @property {'prod'} symbol
|
|
478
|
+
* @property {number} [lineWidth] (related to height)
|
|
479
|
+
* @property {number} [sides] number of sides that make up serif curve (`5`)
|
|
480
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
481
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
482
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
483
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
484
|
+
* based on first use (`'first'`)
|
|
485
|
+
*
|
|
486
|
+
* @extends EQN_Symbol
|
|
487
|
+
*
|
|
488
|
+
* @example
|
|
489
|
+
* // Define in element
|
|
490
|
+
* figure.add({
|
|
491
|
+
* make: 'equation',
|
|
492
|
+
* elements: {
|
|
493
|
+
* sigma: { symbol: 'prod' },
|
|
494
|
+
* },
|
|
495
|
+
* forms: {
|
|
496
|
+
* form1: { prodOf: ['sigma', 'a', 'a = 0', 'n'] },
|
|
497
|
+
* },
|
|
498
|
+
* });
|
|
499
|
+
*
|
|
500
|
+
* @example
|
|
501
|
+
* // Define inline simple one use
|
|
502
|
+
* figure.add({
|
|
503
|
+
* make: 'equation',
|
|
504
|
+
* forms: {
|
|
505
|
+
* form1: { prodOf: ['prod', 'a', 'a = 0', 'n'] },
|
|
506
|
+
* },
|
|
507
|
+
* });
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* // Define inline with reuse
|
|
511
|
+
* const eqn = figure.add({
|
|
512
|
+
* make: 'equation',
|
|
513
|
+
* forms: {
|
|
514
|
+
* form1: { prodOf: ['p1_prod', 'a', 'a = 0', 'n'] },
|
|
515
|
+
* form2: { prodOf: ['p1', 'a', 'a = 0', 'm'] },
|
|
516
|
+
* },
|
|
517
|
+
* });
|
|
518
|
+
* eqn.animations.new()
|
|
519
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
520
|
+
* .start();
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* // Define inline with customization
|
|
524
|
+
* figure.add({
|
|
525
|
+
* make: 'equation',
|
|
526
|
+
* forms: {
|
|
527
|
+
* form1: { prodOf: [{ prod: { lineWidth: 0.01 } }, 'a', 'a = 0', 'n'] },
|
|
528
|
+
* },
|
|
529
|
+
* });
|
|
530
|
+
* @interface
|
|
531
|
+
* @group Equation Symbols
|
|
532
|
+
*/
|
|
533
|
+
export type EQN_ProdSymbol = {
|
|
534
|
+
symbol: 'prod';
|
|
535
|
+
lineWidth?: number;
|
|
536
|
+
sides?: number;
|
|
537
|
+
draw?: 'static' | 'dynamic';
|
|
538
|
+
staticHeight?: number | 'first';
|
|
539
|
+
} & EQN_Symbol;
|
|
540
|
+
/**
|
|
541
|
+
* Integral equation symbol used with the {@link EQN_Integral} equation
|
|
542
|
+
* function.
|
|
543
|
+
*
|
|
544
|
+
* 
|
|
545
|
+
*
|
|
546
|
+
* 
|
|
547
|
+
*
|
|
548
|
+
* 
|
|
549
|
+
*
|
|
550
|
+
*
|
|
551
|
+
* <pre>
|
|
552
|
+
* -------------------------------------------------- 0000000
|
|
553
|
+
* A 000000011111111
|
|
554
|
+
* | 0000000 111111111111
|
|
555
|
+
* | 0000000 11111111111111
|
|
556
|
+
* | 0000000 11111111111111
|
|
557
|
+
* | 0000000 111111111111
|
|
558
|
+
* | 000000000 11111111
|
|
559
|
+
* | 000000000
|
|
560
|
+
* | 0000000000
|
|
561
|
+
* | 000000000
|
|
562
|
+
* | 0000000000
|
|
563
|
+
* | 0000000000
|
|
564
|
+
* | 00000000000
|
|
565
|
+
* | 00000000000
|
|
566
|
+
* | 000000000000
|
|
567
|
+
* | 000000000000 lineWidth
|
|
568
|
+
* | height ------->000000000000<----------
|
|
569
|
+
* | 000000000000
|
|
570
|
+
* | 000000000000
|
|
571
|
+
* | 000000000000
|
|
572
|
+
* | 00000000000
|
|
573
|
+
* | 00000000000
|
|
574
|
+
* | 0000000000
|
|
575
|
+
* | 0000000000
|
|
576
|
+
* | Serif 000000000
|
|
577
|
+
* | \ 000000000
|
|
578
|
+
* | \ 0000000000
|
|
579
|
+
* | 11111111 000000000
|
|
580
|
+
* | 111111111111 00000000
|
|
581
|
+
* | 11111111111111 0000000
|
|
582
|
+
* | 11111111111111 0000000
|
|
583
|
+
* | 111111111111 0000000
|
|
584
|
+
* V 111111110000000
|
|
585
|
+
* ------- 0000000
|
|
586
|
+
* </pre>
|
|
587
|
+
* @property {'int'} symbol
|
|
588
|
+
* @property {number} [lineWidth] (related to height)
|
|
589
|
+
* @property {number} [sides] number of sides that make up s curve (`30`)
|
|
590
|
+
* @property {number} [num] number of integral symbols (`1`)
|
|
591
|
+
* @property {'line' | 'generic'} [type] `line` draws a circle through the
|
|
592
|
+
* symbols denoting a line integral (`generic`)
|
|
593
|
+
* @property {number} [tipWidth] width of s curve tip (related to lineWidth)
|
|
594
|
+
* @property {boolean} [serif] `false` to remove serifs (`true`)
|
|
595
|
+
* @property {number} [serifSides] number of sides in serif circles (`10`)
|
|
596
|
+
* @property {number} [lineIntegralSides] number of sides in line integral circle (`20`)
|
|
597
|
+
|
|
598
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
599
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
600
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
601
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
602
|
+
* based on first use (`'first'`)
|
|
603
|
+
*
|
|
604
|
+
* @extends EQN_Symbol
|
|
605
|
+
*
|
|
606
|
+
* @example
|
|
607
|
+
* // Define in element
|
|
608
|
+
* figure.add({
|
|
609
|
+
* make: 'equation',
|
|
610
|
+
* elements: {
|
|
611
|
+
* int: { symbol: 'int' },
|
|
612
|
+
* },
|
|
613
|
+
* forms: {
|
|
614
|
+
* form1: { int: ['int', 'x dx', 'a', 'b'] },
|
|
615
|
+
* },
|
|
616
|
+
* });
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* // Triple Integral
|
|
620
|
+
* figure.add({
|
|
621
|
+
* make: 'equation',
|
|
622
|
+
* elements: {
|
|
623
|
+
* int: { symbol: 'int', num: 3 },
|
|
624
|
+
* },
|
|
625
|
+
* forms: {
|
|
626
|
+
* form1: { int: ['int', 'dx dy dz'] },
|
|
627
|
+
* },
|
|
628
|
+
* });
|
|
629
|
+
*
|
|
630
|
+
* @example
|
|
631
|
+
* // Line Integral
|
|
632
|
+
* figure.add({
|
|
633
|
+
* make: 'equation',
|
|
634
|
+
* elements: {
|
|
635
|
+
* int: { symbol: 'int', type: 'line' },
|
|
636
|
+
* },
|
|
637
|
+
* forms: {
|
|
638
|
+
* form1: { int: ['int', 'r dr'] },
|
|
639
|
+
* },
|
|
640
|
+
* });
|
|
641
|
+
*
|
|
642
|
+
* @example
|
|
643
|
+
* // Define inline simple one use
|
|
644
|
+
* figure.add({
|
|
645
|
+
* make: 'equation',
|
|
646
|
+
* forms: {
|
|
647
|
+
* form1: { int: ['int', 'x dx', 'a', 'b'] },
|
|
648
|
+
* },
|
|
649
|
+
* });
|
|
650
|
+
*
|
|
651
|
+
* @example
|
|
652
|
+
* // Define inline with reuse
|
|
653
|
+
* const eqn = figure.add({
|
|
654
|
+
* make: 'equation',
|
|
655
|
+
* forms: {
|
|
656
|
+
* form1: { int: ['i1_int', 'x dx', 'a', 'b'] },
|
|
657
|
+
* form2: { int: ['i1', 'y dy', 'a', 'b'] },
|
|
658
|
+
* },
|
|
659
|
+
* });
|
|
660
|
+
* eqn.animations.new()
|
|
661
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
662
|
+
* .start();
|
|
663
|
+
*
|
|
664
|
+
* @example
|
|
665
|
+
* // Define inline with customization
|
|
666
|
+
* figure.add({
|
|
667
|
+
* make: 'equation',
|
|
668
|
+
* forms: {
|
|
669
|
+
* form1: { int: [{ int: { serif: false } }, 'x dx', 'a', 'b'] },
|
|
670
|
+
* },
|
|
671
|
+
* });
|
|
672
|
+
* @interface
|
|
673
|
+
* @group Equation Symbols
|
|
674
|
+
*/
|
|
675
|
+
export type EQN_IntegralSymbol = {
|
|
676
|
+
symbol: 'int';
|
|
677
|
+
lineWidth?: number;
|
|
678
|
+
sides?: number;
|
|
679
|
+
tipWidth?: number;
|
|
680
|
+
draw?: 'static' | 'dynamic';
|
|
681
|
+
staticHeight?: number | 'first';
|
|
682
|
+
serif?: boolean;
|
|
683
|
+
num?: number;
|
|
684
|
+
type?: 'line' | 'generic';
|
|
685
|
+
serifSides?: number;
|
|
686
|
+
lineIntegralSides?: number;
|
|
687
|
+
} & EQN_Symbol;
|
|
688
|
+
/**
|
|
689
|
+
* Radical equation symbol used in {@link EQN_Root}.
|
|
690
|
+
*
|
|
691
|
+
* The radical symbol allows customization on how to draw the radical. Mostly
|
|
692
|
+
* it will not be needed, but for edge case equation layouts it may be useful.
|
|
693
|
+
*
|
|
694
|
+
* 
|
|
695
|
+
*
|
|
696
|
+
* <pre>
|
|
697
|
+
*
|
|
698
|
+
* height
|
|
699
|
+
* |
|
|
700
|
+
* |
|
|
701
|
+
* |_____________________________ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
702
|
+
* A X|
|
|
703
|
+
* | startHeight X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
704
|
+
* | | X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
705
|
+
* | | tickHeight X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
706
|
+
* | | | X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
707
|
+
* | |____V____ X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
708
|
+
* | A | X X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
709
|
+
* | | |__X |X X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
710
|
+
* | | A | | X X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
711
|
+
* | | | | X X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
712
|
+
* | | | | X X | CCCCCCCCCCCCCCCCCCCCCCC
|
|
713
|
+
* V___V______|__|____X |
|
|
714
|
+
* | | | |
|
|
715
|
+
* | | | |
|
|
716
|
+
* tickWidth >|--|< | |
|
|
717
|
+
* | | | |
|
|
718
|
+
* | |<-->|downWidth |
|
|
719
|
+
* | |
|
|
720
|
+
* |<----------------->|
|
|
721
|
+
* startWidth
|
|
722
|
+
* </pre>
|
|
723
|
+
|
|
724
|
+
* @property {'radical'} symbol
|
|
725
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
726
|
+
* @property {number} [width] force width of content area (normally defined by content size)
|
|
727
|
+
* @property {number} [height] force height of content area (normally defined by content size)
|
|
728
|
+
* @property {number} [startWidth] (`0.5`)
|
|
729
|
+
* @property {number} [startHeight] (`0.5`)
|
|
730
|
+
* @property {?number} [maxStartWidth] (`0.15`)
|
|
731
|
+
* @property {?number} [maxStartHeight] (`0.15`)
|
|
732
|
+
* @property {number} [tickHeight]
|
|
733
|
+
* @property {number} [tickWidth]
|
|
734
|
+
* @property {number} [downWidth]
|
|
735
|
+
* @property {boolean} [proportionalToHeight] `true` makes `startHeight`,
|
|
736
|
+
* `startWidth`, `tickHeight`, `tickWidth`, and `downWidth` a percentage of
|
|
737
|
+
* height instead of absolute (`true`)
|
|
738
|
+
* @property {number} [lineWidth2] lineWidth of down stroke (`2 x lineWidth`)
|
|
739
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
740
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
741
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
742
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
743
|
+
* based on first use (`'first'`)
|
|
744
|
+
* @property {number | 'first'} [staticWidth] used when `draw`=`static`.
|
|
745
|
+
* `number` sets width of static symbol - `'first'` calculates and sets width
|
|
746
|
+
* based on first use (`'first'`)
|
|
747
|
+
*
|
|
748
|
+
* @extends EQN_Symbol
|
|
749
|
+
*
|
|
750
|
+
* @example
|
|
751
|
+
* // Define in element
|
|
752
|
+
* figure.add({
|
|
753
|
+
* make: 'equation',
|
|
754
|
+
* elements: {
|
|
755
|
+
* r: { symbol: 'radical' },
|
|
756
|
+
* },
|
|
757
|
+
* forms: {
|
|
758
|
+
* form1: { root: ['r', 'a', false, 0.05] },
|
|
759
|
+
* },
|
|
760
|
+
* });
|
|
761
|
+
*
|
|
762
|
+
* @example
|
|
763
|
+
* // Define inline simple one use
|
|
764
|
+
* figure.add({
|
|
765
|
+
* make: 'equation',
|
|
766
|
+
* forms: {
|
|
767
|
+
* form1: { root: ['radical', 'a', false, 0.05] },
|
|
768
|
+
* },
|
|
769
|
+
* });
|
|
770
|
+
*
|
|
771
|
+
* @example
|
|
772
|
+
* // Define inline with reuse
|
|
773
|
+
* const eqn = figure.add({
|
|
774
|
+
* make: 'equation',
|
|
775
|
+
* forms: {
|
|
776
|
+
* form1: { root: ['r1_radical', 'a', false, 0.05] },
|
|
777
|
+
* form2: { root: ['r1', ['a', 'b'], false, 0.05] },
|
|
778
|
+
* },
|
|
779
|
+
* });
|
|
780
|
+
* eqn.animations.new()
|
|
781
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
782
|
+
* .start();
|
|
783
|
+
*
|
|
784
|
+
* @example
|
|
785
|
+
* // Define inline with customization
|
|
786
|
+
* figure.add({
|
|
787
|
+
* make: 'equation',
|
|
788
|
+
* forms: {
|
|
789
|
+
* form1: { root: [{ radical: { lineWidth: 0.005 } }, 'a', false, 0.05] },
|
|
790
|
+
* },
|
|
791
|
+
* });
|
|
792
|
+
* @interface
|
|
793
|
+
* @group Equation Symbols
|
|
794
|
+
*/
|
|
795
|
+
export type EQN_RadicalSymbol = {
|
|
796
|
+
symbol: 'radical';
|
|
797
|
+
lineWidth?: number;
|
|
798
|
+
width?: number;
|
|
799
|
+
height?: number;
|
|
800
|
+
startWidth?: number;
|
|
801
|
+
startHeight?: number;
|
|
802
|
+
proportionalToHeight?: boolean;
|
|
803
|
+
maxStartWidth?: number | null | undefined;
|
|
804
|
+
maxStartHeight?: number | null | undefined;
|
|
805
|
+
lineWidth2?: number;
|
|
806
|
+
tickWidth?: number;
|
|
807
|
+
tickHeight?: number;
|
|
808
|
+
downWidth?: number;
|
|
809
|
+
draw: 'static' | 'dynamic';
|
|
810
|
+
staticHeight?: number | 'first';
|
|
811
|
+
staticWidth?: number | 'first';
|
|
812
|
+
} & EQN_Symbol;
|
|
813
|
+
/**
|
|
814
|
+
* Division equation symbol used in {@link EQN_Root}.
|
|
815
|
+
*
|
|
816
|
+
* The division symbol allows customization on how to draw the long form and
|
|
817
|
+
* short form division symbol. Mostly it will not be needed, but for edge case
|
|
818
|
+
* equation layouts it may be useful.
|
|
819
|
+
*
|
|
820
|
+
* 
|
|
821
|
+
*
|
|
822
|
+
* <pre>
|
|
823
|
+
*
|
|
824
|
+
* left space right space
|
|
825
|
+
* bend width |<->|<---->| >|--|<
|
|
826
|
+
* | | | | |
|
|
827
|
+
* | | | | |
|
|
828
|
+
* ------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX____V
|
|
829
|
+
* A X | | |_______|
|
|
830
|
+
* | X | CCCCCCCCCCCCCCCCCCCCCCC A
|
|
831
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC top space
|
|
832
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
833
|
+
* height | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
834
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
835
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
836
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
837
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC
|
|
838
|
+
* | X CCCCCCCCCCCCCCCCCCCCCCC bottom space
|
|
839
|
+
* V X CCCCCCCCCCCCCCCCCCCCCCC_______V
|
|
840
|
+
* ------ X _________________________________________|
|
|
841
|
+
* | A
|
|
842
|
+
* | |
|
|
843
|
+
* | width |
|
|
844
|
+
* |<----------------------------------------->
|
|
845
|
+
*
|
|
846
|
+
* </pre>
|
|
847
|
+
*
|
|
848
|
+
* @property {'division'} symbol
|
|
849
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
850
|
+
* @property {number} [width] force width of content area (normally defined by content size)
|
|
851
|
+
* @property {number} [height] force height of content area (normally defined by content size)
|
|
852
|
+
* @property {number} [bendWidth] (`0`)
|
|
853
|
+
* @property {number} [sides] (`10`)
|
|
854
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
855
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
856
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
857
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
858
|
+
* based on first use (`'first'`)
|
|
859
|
+
* @property {number | 'first'} [staticWidth] used when `draw`=`static`.
|
|
860
|
+
* `number` sets width of static symbol - `'first'` calculates and sets width
|
|
861
|
+
* based on first use (`'first'`)
|
|
862
|
+
*
|
|
863
|
+
* @extends EQN_Symbol
|
|
864
|
+
*
|
|
865
|
+
* @example
|
|
866
|
+
* // Define in element
|
|
867
|
+
* figure.add({
|
|
868
|
+
* make: 'equation',
|
|
869
|
+
* elements: {
|
|
870
|
+
* d: { symbol: 'division', bendWidth: 0.05 },
|
|
871
|
+
* },
|
|
872
|
+
* forms: {
|
|
873
|
+
* form1: { box: ['abc', 'd'] },
|
|
874
|
+
* },
|
|
875
|
+
* });
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* // Define inline simple one use
|
|
879
|
+
* figure.add({
|
|
880
|
+
* make: 'equation',
|
|
881
|
+
* forms: {
|
|
882
|
+
* form1: { box: ['abc', 'division'] },
|
|
883
|
+
* },
|
|
884
|
+
* });
|
|
885
|
+
*
|
|
886
|
+
* @example
|
|
887
|
+
* // Define inline with reuse
|
|
888
|
+
* const eqn = figure.add({
|
|
889
|
+
* make: 'equation',
|
|
890
|
+
* forms: {
|
|
891
|
+
* form1: { box: ['abc', 'd1_division'] },
|
|
892
|
+
* form2: { box: ['abc', 'd1'] },
|
|
893
|
+
* },
|
|
894
|
+
* });
|
|
895
|
+
* eqn.animations.new()
|
|
896
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
897
|
+
* .start();
|
|
898
|
+
*
|
|
899
|
+
* @example
|
|
900
|
+
* // Define inline with customization
|
|
901
|
+
* figure.add({
|
|
902
|
+
* make: 'equation',
|
|
903
|
+
* forms: {
|
|
904
|
+
* form1: { box: ['abc', { division: { lineWidth: 0.005 } }] },
|
|
905
|
+
* },
|
|
906
|
+
* });
|
|
907
|
+
* @interface
|
|
908
|
+
* @group Equation Symbols
|
|
909
|
+
*/
|
|
910
|
+
export type EQN_DivisionSymbol = {
|
|
911
|
+
symbol: 'division';
|
|
912
|
+
lineWidth?: number;
|
|
913
|
+
width?: number;
|
|
914
|
+
height?: number;
|
|
915
|
+
bendWidth?: number;
|
|
916
|
+
sides?: number;
|
|
917
|
+
draw: 'static' | 'dynamic';
|
|
918
|
+
staticHeight?: number | 'first';
|
|
919
|
+
staticWidth?: number | 'first';
|
|
920
|
+
} & EQN_Symbol;
|
|
921
|
+
/**
|
|
922
|
+
* Strike equation symbol used in {@link EQN_Strike}.
|
|
923
|
+
*
|
|
924
|
+
* Integral equation symbol used with the {@link EQN_Strike} and
|
|
925
|
+
* {@link EQN_StrikeComment} equation functions.
|
|
926
|
+
*
|
|
927
|
+
* 
|
|
928
|
+
*
|
|
929
|
+
* 
|
|
930
|
+
*
|
|
931
|
+
* 
|
|
932
|
+
*
|
|
933
|
+
* 
|
|
934
|
+
*
|
|
935
|
+
* Four styles of strike symbol are available:
|
|
936
|
+
* <pre>
|
|
937
|
+
*
|
|
938
|
+
*
|
|
939
|
+
* 000 000
|
|
940
|
+
* 000 000
|
|
941
|
+
* 000 000
|
|
942
|
+
* 000 0000000000000000
|
|
943
|
+
* 000 000
|
|
944
|
+
* 000 000
|
|
945
|
+
* 000 000
|
|
946
|
+
* cross horizontal
|
|
947
|
+
*
|
|
948
|
+
*
|
|
949
|
+
* 000 000
|
|
950
|
+
* 000 000
|
|
951
|
+
* 000 000
|
|
952
|
+
* 000 000
|
|
953
|
+
* 000 000
|
|
954
|
+
* 000 000
|
|
955
|
+
* 000 000
|
|
956
|
+
* forward back
|
|
957
|
+
*
|
|
958
|
+
* </pre>
|
|
959
|
+
*
|
|
960
|
+
* @property {'strike'} symbol
|
|
961
|
+
* @property {'cross' | 'forward' | 'back' | 'horizontal'} [style] (`'cross'`)
|
|
962
|
+
* @property {number} [lineWidth] (`0.015`)
|
|
963
|
+
* @property {number} [width] force width of strike (normally defined by
|
|
964
|
+
* content size)
|
|
965
|
+
* @property {number} [height] force height of strike (normally defined by
|
|
966
|
+
* content size)
|
|
967
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
968
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
969
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
970
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
971
|
+
* based on first use (`'first'`)
|
|
972
|
+
* @property {number | 'first'} [staticWidth] used when `draw`=`static`.
|
|
973
|
+
* `number` sets width of static symbol - `'first'` calculates and sets width
|
|
974
|
+
* based on first use (`'first'`)
|
|
975
|
+
*
|
|
976
|
+
* @extends EQN_Symbol
|
|
977
|
+
*
|
|
978
|
+
* @example
|
|
979
|
+
* // Define in element
|
|
980
|
+
* figure.add({
|
|
981
|
+
* make: 'equation',
|
|
982
|
+
* elements: {
|
|
983
|
+
* s: { symbol: 'strike', style: 'cross', lineWidth: 0.01 },
|
|
984
|
+
* },
|
|
985
|
+
* forms: {
|
|
986
|
+
* form1: { strike: ['ABC', 's'] },
|
|
987
|
+
* },
|
|
988
|
+
* });
|
|
989
|
+
*
|
|
990
|
+
* @example
|
|
991
|
+
* // Forward Strike
|
|
992
|
+
* figure.add({
|
|
993
|
+
* make: 'equation',
|
|
994
|
+
* elements: {
|
|
995
|
+
* s: { symbol: 'strike', style: 'forward', lineWidth: 0.01 },
|
|
996
|
+
* },
|
|
997
|
+
* forms: {
|
|
998
|
+
* form1: { strike: ['ABC', 's'] },
|
|
999
|
+
* },
|
|
1000
|
+
* });
|
|
1001
|
+
*
|
|
1002
|
+
* @example
|
|
1003
|
+
* // Back Strike
|
|
1004
|
+
* figure.add({
|
|
1005
|
+
* make: 'equation',
|
|
1006
|
+
* elements: {
|
|
1007
|
+
* s: { symbol: 'strike', style: 'back', lineWidth: 0.01 },
|
|
1008
|
+
* },
|
|
1009
|
+
* forms: {
|
|
1010
|
+
* form1: { strike: ['ABC', 's'] },
|
|
1011
|
+
* },
|
|
1012
|
+
* });
|
|
1013
|
+
*
|
|
1014
|
+
* @example
|
|
1015
|
+
* // Horizontal Slash
|
|
1016
|
+
* figure.add({
|
|
1017
|
+
* make: 'equation',
|
|
1018
|
+
* elements: {
|
|
1019
|
+
* s: { symbol: 'strike', style: 'horizontal', lineWidth: 0.01 },
|
|
1020
|
+
* },
|
|
1021
|
+
* forms: {
|
|
1022
|
+
* form1: { strike: ['ABC', 's'] },
|
|
1023
|
+
* },
|
|
1024
|
+
* });
|
|
1025
|
+
*
|
|
1026
|
+
* @example
|
|
1027
|
+
* // Define inline simple one use
|
|
1028
|
+
* figure.add({
|
|
1029
|
+
* make: 'equation',
|
|
1030
|
+
* forms: {
|
|
1031
|
+
* form1: { strike: ['ABC', 'strike'] },
|
|
1032
|
+
* },
|
|
1033
|
+
* });
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* // Define inline with reuse
|
|
1037
|
+
* const eqn = figure.add({
|
|
1038
|
+
* make: 'equation',
|
|
1039
|
+
* forms: {
|
|
1040
|
+
* form1: { strike: ['ABC', 's1_strike'] },
|
|
1041
|
+
* form2: { strike: ['DEFGH', 's1'] },
|
|
1042
|
+
* },
|
|
1043
|
+
* });
|
|
1044
|
+
* eqn.animations.new()
|
|
1045
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
1046
|
+
* .start();
|
|
1047
|
+
*
|
|
1048
|
+
* @example
|
|
1049
|
+
* // Define inline with customization
|
|
1050
|
+
* figure.add({
|
|
1051
|
+
* make: 'equation',
|
|
1052
|
+
* forms: {
|
|
1053
|
+
* form1: { strike: ['ABC', { strike: { style: 'forward' } }] },
|
|
1054
|
+
* },
|
|
1055
|
+
* });
|
|
1056
|
+
* @interface
|
|
1057
|
+
* @group Equation Symbols
|
|
1058
|
+
*/
|
|
1059
|
+
export type EQN_StrikeSymbol = {
|
|
1060
|
+
symbol: 'strike';
|
|
1061
|
+
style?: 'cross' | 'forward' | 'back' | 'horizontal';
|
|
1062
|
+
lineWidth?: number;
|
|
1063
|
+
width?: number;
|
|
1064
|
+
height?: number;
|
|
1065
|
+
draw: 'static' | 'dynamic';
|
|
1066
|
+
staticHeight?: number | 'first';
|
|
1067
|
+
staticWidth?: number | 'first';
|
|
1068
|
+
} & EQN_Symbol;
|
|
1069
|
+
/**
|
|
1070
|
+
*
|
|
1071
|
+
* Bracket equation symbol used in {@link EQN_Bracket}, {@link EQN_Bar},
|
|
1072
|
+
* {@link EQN_Matrix}, and {@link EQN_Comment}.
|
|
1073
|
+
*
|
|
1074
|
+
*
|
|
1075
|
+
* 
|
|
1076
|
+
*
|
|
1077
|
+
*<pre>
|
|
1078
|
+
* tipWidth
|
|
1079
|
+
* ----->| |<---
|
|
1080
|
+
* | |
|
|
1081
|
+
* | |
|
|
1082
|
+
* 000
|
|
1083
|
+
* 0000
|
|
1084
|
+
* 00000
|
|
1085
|
+
* 000000
|
|
1086
|
+
* 000000
|
|
1087
|
+
* 000000
|
|
1088
|
+
* lineWidth 000000
|
|
1089
|
+
* ------>000000<---
|
|
1090
|
+
* 000000
|
|
1091
|
+
* |000000
|
|
1092
|
+
* |000000
|
|
1093
|
+
* | 000000
|
|
1094
|
+
* | 00000
|
|
1095
|
+
* | 0000
|
|
1096
|
+
* | 000
|
|
1097
|
+
* | |
|
|
1098
|
+
* | |
|
|
1099
|
+
* |<------->|
|
|
1100
|
+
* width
|
|
1101
|
+
* </pre>
|
|
1102
|
+
*
|
|
1103
|
+
* @property {'bracket'} symbol
|
|
1104
|
+
* @property {'left' | 'right' | 'top' | 'bottom'} [side] how to orient the
|
|
1105
|
+
* bracket ('left')
|
|
1106
|
+
* @property {number} [sides] number of sides in bracket curve (`10`)
|
|
1107
|
+
* @property {number} [lineWidth] (depends on height)
|
|
1108
|
+
* @property {number} [tipWidth] (depends on lineWidth)
|
|
1109
|
+
* @property {number} [width] force width bracket (normally depends on height)
|
|
1110
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
1111
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
1112
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
1113
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
1114
|
+
* based on first use (`'first'`)
|
|
1115
|
+
*
|
|
1116
|
+
* @extends EQN_Symbol
|
|
1117
|
+
*
|
|
1118
|
+
* @example
|
|
1119
|
+
* // Define in element
|
|
1120
|
+
* figure.add({
|
|
1121
|
+
* make: 'equation',
|
|
1122
|
+
* elements: {
|
|
1123
|
+
* lb: { symbol: 'bracket', side: 'left' },
|
|
1124
|
+
* rb: { symbol: 'bracket', side: 'right' },
|
|
1125
|
+
* },
|
|
1126
|
+
* forms: {
|
|
1127
|
+
* form1: { brac: ['lb', 'a', 'rb'] },
|
|
1128
|
+
* },
|
|
1129
|
+
* });
|
|
1130
|
+
*
|
|
1131
|
+
* @example
|
|
1132
|
+
* // Define inline
|
|
1133
|
+
* figure.add({
|
|
1134
|
+
* make: 'equation',
|
|
1135
|
+
* forms: {
|
|
1136
|
+
* form1: {
|
|
1137
|
+
* brac: [
|
|
1138
|
+
* { lb_bracket: { side: 'left' } },
|
|
1139
|
+
* 'a',
|
|
1140
|
+
* { rb_bracket: { side: 'right' } },
|
|
1141
|
+
* ],
|
|
1142
|
+
* },
|
|
1143
|
+
* },
|
|
1144
|
+
* });
|
|
1145
|
+
* @interface
|
|
1146
|
+
* @group Equation Symbols
|
|
1147
|
+
*/
|
|
1148
|
+
export type EQN_BracketSymbol = {
|
|
1149
|
+
symbol: 'bracket';
|
|
1150
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
1151
|
+
lineWidth?: number;
|
|
1152
|
+
sides?: number;
|
|
1153
|
+
width?: number;
|
|
1154
|
+
tipWidth?: number;
|
|
1155
|
+
draw?: 'static' | 'dynamic';
|
|
1156
|
+
staticHeight?: number | 'first';
|
|
1157
|
+
} & EQN_Symbol;
|
|
1158
|
+
/**
|
|
1159
|
+
* Angle bracket equation symbol used in {@link EQN_Bracket}, {@link EQN_Bar},
|
|
1160
|
+
* {@link EQN_Matrix}, and {@link EQN_Comment}.
|
|
1161
|
+
*
|
|
1162
|
+
*
|
|
1163
|
+
* 
|
|
1164
|
+
*
|
|
1165
|
+
* <pre>
|
|
1166
|
+
* width
|
|
1167
|
+
* |<------->|
|
|
1168
|
+
* | |
|
|
1169
|
+
* --------|----- 0000
|
|
1170
|
+
* A | 0000
|
|
1171
|
+
* | | 0000
|
|
1172
|
+
* | | 0000
|
|
1173
|
+
* | | 0000
|
|
1174
|
+
* | 0000
|
|
1175
|
+
* height | 0000
|
|
1176
|
+
* | 0000
|
|
1177
|
+
* | 0000
|
|
1178
|
+
* | 0000
|
|
1179
|
+
* | 0000
|
|
1180
|
+
* | 0000
|
|
1181
|
+
* | 0000
|
|
1182
|
+
* V_____________ 0000
|
|
1183
|
+
*
|
|
1184
|
+
* </pre>
|
|
1185
|
+
*
|
|
1186
|
+
* @property {'angleBracket'} symbol
|
|
1187
|
+
* @property {'left' | 'right' | 'top' | 'bottom'} [side] how to orient the
|
|
1188
|
+
* angle bracket ('left')
|
|
1189
|
+
* @property {number} [lineWidth] (depends on height)
|
|
1190
|
+
* @property {number} [width] force width bracket (normally depends on height)
|
|
1191
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
1192
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
1193
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
1194
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
1195
|
+
* based on first use (`'first'`)
|
|
1196
|
+
*
|
|
1197
|
+
* @extends EQN_Symbol
|
|
1198
|
+
*
|
|
1199
|
+
* @example
|
|
1200
|
+
* // Define in element
|
|
1201
|
+
* figure.add({
|
|
1202
|
+
* make: 'equation',
|
|
1203
|
+
* elements: {
|
|
1204
|
+
* lb: { symbol: 'angleBracket', side: 'left' },
|
|
1205
|
+
* rb: { symbol: 'angleBracket', side: 'right' },
|
|
1206
|
+
* },
|
|
1207
|
+
* forms: {
|
|
1208
|
+
* form1: { brac: ['lb', 'a', 'rb'] },
|
|
1209
|
+
* },
|
|
1210
|
+
* });
|
|
1211
|
+
*
|
|
1212
|
+
* @example
|
|
1213
|
+
* // Define inline
|
|
1214
|
+
* figure.add({
|
|
1215
|
+
* make: 'equation',
|
|
1216
|
+
* forms: {
|
|
1217
|
+
* form1: {
|
|
1218
|
+
* brac: [
|
|
1219
|
+
* { lb_angleBracket: { side: 'left' } },
|
|
1220
|
+
* 'a',
|
|
1221
|
+
* { rb_angleBracket: { side: 'right' } },
|
|
1222
|
+
* ],
|
|
1223
|
+
* },
|
|
1224
|
+
* },
|
|
1225
|
+
* });
|
|
1226
|
+
* @interface
|
|
1227
|
+
* @group Equation Symbols
|
|
1228
|
+
*/
|
|
1229
|
+
export type EQN_AngleBracketSymbol = {
|
|
1230
|
+
symbol: 'angleBracket';
|
|
1231
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
1232
|
+
lineWidth?: number;
|
|
1233
|
+
width?: number;
|
|
1234
|
+
draw?: 'dynamic' | 'static';
|
|
1235
|
+
staticHeight?: number | 'first';
|
|
1236
|
+
} & EQN_Symbol;
|
|
1237
|
+
/**
|
|
1238
|
+
* Brace equation symbol used in {@link EQN_Bracket}, {@link EQN_Bar},
|
|
1239
|
+
* {@link EQN_Matrix}, and {@link EQN_Comment}.
|
|
1240
|
+
*
|
|
1241
|
+
*
|
|
1242
|
+
* 
|
|
1243
|
+
*
|
|
1244
|
+
* <pre>
|
|
1245
|
+
* width
|
|
1246
|
+
* |<------>|
|
|
1247
|
+
* | |
|
|
1248
|
+
* | |
|
|
1249
|
+
* | 000
|
|
1250
|
+
* | 000
|
|
1251
|
+
* | 000
|
|
1252
|
+
* | 0000
|
|
1253
|
+
* | 0000
|
|
1254
|
+
* | 0000
|
|
1255
|
+
* | 0000
|
|
1256
|
+
* | 000
|
|
1257
|
+
* | 000
|
|
1258
|
+
* 000
|
|
1259
|
+
* 000
|
|
1260
|
+
* 000
|
|
1261
|
+
* 0000
|
|
1262
|
+
* 0000
|
|
1263
|
+
* 0000
|
|
1264
|
+
* 0000
|
|
1265
|
+
* - - -0000 - - - -
|
|
1266
|
+
* | 000 |
|
|
1267
|
+
* | 000 |
|
|
1268
|
+
* | 000 |
|
|
1269
|
+
* - - - - - - - - -
|
|
1270
|
+
* \
|
|
1271
|
+
* \
|
|
1272
|
+
* \
|
|
1273
|
+
* - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1274
|
+
* | 00000000000000 |
|
|
1275
|
+
* | 00000000000000 |
|
|
1276
|
+
* | 000000000000 tipWidth |
|
|
1277
|
+
* | 000000000000 | |
|
|
1278
|
+
* | 000000000000 | |
|
|
1279
|
+
* | 0000000000000 _______V_ |
|
|
1280
|
+
* | 00000000000 |
|
|
1281
|
+
* | 0000000_________ |
|
|
1282
|
+
* | A |
|
|
1283
|
+
* - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
1284
|
+
*
|
|
1285
|
+
* </pre>
|
|
1286
|
+
*
|
|
1287
|
+
* @property {'brace'} symbol
|
|
1288
|
+
* @property {'left' | 'right' | 'top' | 'bottom'} [side] how to orient the
|
|
1289
|
+
* brace ('left')
|
|
1290
|
+
* @property {number} [lineWidth] (depends on height)
|
|
1291
|
+
* @property {number} [tipWidth] (depends on lineWidth)
|
|
1292
|
+
* @property {number} [width] force width bracket (normally depends on height)
|
|
1293
|
+
* @property {number} [sides] number of sides in curved sections (`10`)
|
|
1294
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
1295
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
1296
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
1297
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
1298
|
+
* based on first use (`'first'`)
|
|
1299
|
+
*
|
|
1300
|
+
* @extends EQN_Symbol
|
|
1301
|
+
*
|
|
1302
|
+
* @example
|
|
1303
|
+
* // Define in element
|
|
1304
|
+
* figure.add({
|
|
1305
|
+
* make: 'equation',
|
|
1306
|
+
* elements: {
|
|
1307
|
+
* lb: { symbol: 'brace', side: 'left' },
|
|
1308
|
+
* rb: { symbol: 'brace', side: 'right' },
|
|
1309
|
+
* },
|
|
1310
|
+
* forms: {
|
|
1311
|
+
* form1: { brac: ['lb', 'a', 'rb'] },
|
|
1312
|
+
* },
|
|
1313
|
+
* });
|
|
1314
|
+
*
|
|
1315
|
+
* @example
|
|
1316
|
+
* // Define inline
|
|
1317
|
+
* figure.add({
|
|
1318
|
+
* make: 'equation',
|
|
1319
|
+
* forms: {
|
|
1320
|
+
* form1: {
|
|
1321
|
+
* brac: [
|
|
1322
|
+
* { lb_brace: { side: 'left' } },
|
|
1323
|
+
* 'a',
|
|
1324
|
+
* { rb_brace: { side: 'right' } },
|
|
1325
|
+
* ],
|
|
1326
|
+
* },
|
|
1327
|
+
* },
|
|
1328
|
+
* });
|
|
1329
|
+
* @interface
|
|
1330
|
+
* @group Equation Symbols
|
|
1331
|
+
*/
|
|
1332
|
+
export type EQN_BraceSymbol = {
|
|
1333
|
+
symbol: 'brace';
|
|
1334
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
1335
|
+
lineWidth?: number;
|
|
1336
|
+
sides?: number;
|
|
1337
|
+
width?: number;
|
|
1338
|
+
tipWidth?: number;
|
|
1339
|
+
draw?: 'dynamic' | 'static';
|
|
1340
|
+
staticHeight?: number | 'first';
|
|
1341
|
+
} & EQN_Symbol;
|
|
1342
|
+
/**
|
|
1343
|
+
* Bar equation symbol.
|
|
1344
|
+
*
|
|
1345
|
+
* The bar side defines where it can be used:
|
|
1346
|
+
* - `'top'`, `'bottom'`: {@link EQN_Bar} (top and bottom sides),
|
|
1347
|
+
* {@link EQN_Comment}, and {@link EQN_LeftRightGlyph}
|
|
1348
|
+
* - `'left'`, `'right'`: {@link EQN_Bracket}, {@link EQN_Bar} (left and right
|
|
1349
|
+
* sides), {@link EQN_Matrix} and {@link EQN_TopBottomGlyph}
|
|
1350
|
+
*
|
|
1351
|
+
* Note, as the default direciton is `'right'`, using the inline definition of
|
|
1352
|
+
* arrow will only work with {@link EQN_Bar} (top and bottom sides),
|
|
1353
|
+
* {@link EQN_Comment}, and {@link EQN_LeftRightGlyph}.
|
|
1354
|
+
*
|
|
1355
|
+
* 
|
|
1356
|
+
*
|
|
1357
|
+
* 
|
|
1358
|
+
*
|
|
1359
|
+
* <pre>
|
|
1360
|
+
*
|
|
1361
|
+
* >| |<---- lineWidth
|
|
1362
|
+
* | |
|
|
1363
|
+
* | |
|
|
1364
|
+
* 000
|
|
1365
|
+
* 000
|
|
1366
|
+
* 000
|
|
1367
|
+
* 000
|
|
1368
|
+
* 000
|
|
1369
|
+
* 000
|
|
1370
|
+
* 000
|
|
1371
|
+
* 000
|
|
1372
|
+
* 000
|
|
1373
|
+
* 000
|
|
1374
|
+
* 000
|
|
1375
|
+
*
|
|
1376
|
+
* </pre>
|
|
1377
|
+
*
|
|
1378
|
+
* @property {'bar'} symbol
|
|
1379
|
+
* @property {'left' | 'right' | 'top' | 'bottom'} [side] how to orient the
|
|
1380
|
+
* bar ('left')
|
|
1381
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
1382
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
1383
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
1384
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
1385
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
1386
|
+
* based on first use (`'first'`)
|
|
1387
|
+
*
|
|
1388
|
+
* @extends EQN_Symbol
|
|
1389
|
+
*
|
|
1390
|
+
* @example
|
|
1391
|
+
* // Define in element
|
|
1392
|
+
* figure.add({
|
|
1393
|
+
* make: 'equation',
|
|
1394
|
+
* elements: {
|
|
1395
|
+
* b: { symbol: 'bar', side: 'top' },
|
|
1396
|
+
* },
|
|
1397
|
+
* forms: {
|
|
1398
|
+
* form1: { bar: ['a', 'b', false, 0.05, 0.03] },
|
|
1399
|
+
* },
|
|
1400
|
+
* });
|
|
1401
|
+
*
|
|
1402
|
+
* @example
|
|
1403
|
+
* // Define inline simple one use
|
|
1404
|
+
* figure.add({
|
|
1405
|
+
* make: 'equation',
|
|
1406
|
+
* forms: {
|
|
1407
|
+
* form1: {
|
|
1408
|
+
* bar: {
|
|
1409
|
+
* content: 'a',
|
|
1410
|
+
* symbol: 'bar',
|
|
1411
|
+
* side: 'left',
|
|
1412
|
+
* overhang: 0.1,
|
|
1413
|
+
* },
|
|
1414
|
+
* },
|
|
1415
|
+
* },
|
|
1416
|
+
* });
|
|
1417
|
+
*
|
|
1418
|
+
* @example
|
|
1419
|
+
* // Define inline with reuse
|
|
1420
|
+
* const eqn = figure.add({
|
|
1421
|
+
* make: 'equation',
|
|
1422
|
+
* forms: {
|
|
1423
|
+
* form1: { bar: ['a', { bar: { side: 'top' } }, false, 0.05, 0.03] },
|
|
1424
|
+
* form2: { bar: [['a', 'bc'], { bar: { side: 'top' } }, false, 0.05, 0.03] },
|
|
1425
|
+
* },
|
|
1426
|
+
* });
|
|
1427
|
+
* eqn.animations.new()
|
|
1428
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
1429
|
+
* .start();
|
|
1430
|
+
*
|
|
1431
|
+
* @example
|
|
1432
|
+
* // Define inline with customization
|
|
1433
|
+
* figure.add({
|
|
1434
|
+
* make: 'equation',
|
|
1435
|
+
* forms: {
|
|
1436
|
+
* form1: { bar: ['a', { bar: { side: 'top' } }, false, 0.05, 0.03] },
|
|
1437
|
+
* },
|
|
1438
|
+
* });
|
|
1439
|
+
* @interface
|
|
1440
|
+
* @group Equation Symbols
|
|
1441
|
+
*/
|
|
1442
|
+
export type EQN_BarSymbol = {
|
|
1443
|
+
symbol: 'bar';
|
|
1444
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
1445
|
+
lineWidth?: number;
|
|
1446
|
+
draw?: 'dynamic' | 'static';
|
|
1447
|
+
staticHeight?: number | 'first';
|
|
1448
|
+
} & EQN_Symbol;
|
|
1449
|
+
/**
|
|
1450
|
+
* Square bracket equation symbol used in {@link EQN_Bracket}, {@link EQN_Bar},
|
|
1451
|
+
* {@link EQN_Matrix}, and {@link EQN_Comment}.
|
|
1452
|
+
*
|
|
1453
|
+
*
|
|
1454
|
+
* 
|
|
1455
|
+
*
|
|
1456
|
+
* <pre>
|
|
1457
|
+
*
|
|
1458
|
+
* width
|
|
1459
|
+
* |<--------------------->|
|
|
1460
|
+
* | |
|
|
1461
|
+
* ___ ____
|
|
1462
|
+
* A 0000000000000000000000000 A
|
|
1463
|
+
* | 0000000000000000000000000 | tipWidth
|
|
1464
|
+
* | 0000000000000000000000000 ___V
|
|
1465
|
+
* | 00000000
|
|
1466
|
+
* | 00000000
|
|
1467
|
+
* | 00000000
|
|
1468
|
+
* | 00000000
|
|
1469
|
+
* height | 00000000
|
|
1470
|
+
* | 00000000
|
|
1471
|
+
* | 00000000
|
|
1472
|
+
* | 00000000
|
|
1473
|
+
* | 00000000
|
|
1474
|
+
* | 00000000
|
|
1475
|
+
* | 0000000000000000000000000
|
|
1476
|
+
* | 0000000000000000000000000
|
|
1477
|
+
* V___ 0000000000000000000000000
|
|
1478
|
+
*
|
|
1479
|
+
* | |
|
|
1480
|
+
* | |
|
|
1481
|
+
* |<---->|
|
|
1482
|
+
* line width
|
|
1483
|
+
*
|
|
1484
|
+
* </pre>
|
|
1485
|
+
*
|
|
1486
|
+
* @property {'squareBracket'} symbol
|
|
1487
|
+
* @property {'left' | 'right' | 'top' | 'bottom'} [side] how to orient the
|
|
1488
|
+
* square bracket ('left')
|
|
1489
|
+
* @property {number} [lineWidth] (`0.01`)
|
|
1490
|
+
* @property {number} [tipWidth] (`0.01`)
|
|
1491
|
+
* @property {number} [width] (depends on lineWidth)
|
|
1492
|
+
* @property {number} [radius] optional curved corner radius (`0`)
|
|
1493
|
+
* @property {number} [sides] number of sides in curve (`5`)
|
|
1494
|
+
* @property {'static' | 'dynamic'} [draw] `'static'` updates vertices on
|
|
1495
|
+
* resize, `'static'` only changes scale transform (`dynamic`)
|
|
1496
|
+
* @property {number | 'first'} [staticHeight] used when `draw`=`static`.
|
|
1497
|
+
* `number` sets height of static symbol - `'first'` calculates and sets height
|
|
1498
|
+
* based on first use (`'first'`)
|
|
1499
|
+
*
|
|
1500
|
+
* @extends EQN_Symbol
|
|
1501
|
+
*
|
|
1502
|
+
* @example
|
|
1503
|
+
* // Define in element
|
|
1504
|
+
* figure.add({
|
|
1505
|
+
* make: 'equation',
|
|
1506
|
+
* elements: {
|
|
1507
|
+
* lb: { symbol: 'squareBracket', side: 'left' },
|
|
1508
|
+
* rb: { symbol: 'squareBracket', side: 'right' },
|
|
1509
|
+
* },
|
|
1510
|
+
* forms: {
|
|
1511
|
+
* form1: { brac: ['lb', 'a', 'rb'] },
|
|
1512
|
+
* },
|
|
1513
|
+
* });
|
|
1514
|
+
*
|
|
1515
|
+
* @example
|
|
1516
|
+
* // Define inline
|
|
1517
|
+
* figure.add({
|
|
1518
|
+
* make: 'equation',
|
|
1519
|
+
* forms: {
|
|
1520
|
+
* form1: {
|
|
1521
|
+
* brac: [
|
|
1522
|
+
* { lb_squareBracket: { side: 'left' } },
|
|
1523
|
+
* 'a',
|
|
1524
|
+
* { rb_squareBracket: { side: 'right' } },
|
|
1525
|
+
* ],
|
|
1526
|
+
* },
|
|
1527
|
+
* },
|
|
1528
|
+
* });
|
|
1529
|
+
* @interface
|
|
1530
|
+
* @group Equation Symbols
|
|
1531
|
+
*/
|
|
1532
|
+
export type EQN_SquareBracketSymbol = {
|
|
1533
|
+
symbol: 'squareBracket';
|
|
1534
|
+
side?: 'left' | 'right' | 'top' | 'bottom';
|
|
1535
|
+
lineWidth?: number;
|
|
1536
|
+
width?: number;
|
|
1537
|
+
tipWidth?: number;
|
|
1538
|
+
radius?: number;
|
|
1539
|
+
sides?: number;
|
|
1540
|
+
draw?: 'dynamic' | 'static';
|
|
1541
|
+
staticHeight?: number | 'first';
|
|
1542
|
+
} & EQN_Symbol;
|
|
1543
|
+
/**
|
|
1544
|
+
* A line symbol to be used in {@link EQN_Annotate} and {@link EQN_Comment} as
|
|
1545
|
+
* an {@link EQN_LineGlyph} to draw a line between the content and an
|
|
1546
|
+
* annotation.
|
|
1547
|
+
*
|
|
1548
|
+
* The line can be solid or dashed, and have arrows on either or both ends.
|
|
1549
|
+
*
|
|
1550
|
+
* 
|
|
1551
|
+
*
|
|
1552
|
+
* 
|
|
1553
|
+
*
|
|
1554
|
+
* @property {number} [width] line width
|
|
1555
|
+
* @property {TypeDash} [dash] dash style of line
|
|
1556
|
+
* @property {OBJ_LineArrows} [arrow] arrow styles of line where start is
|
|
1557
|
+
* toward the content
|
|
1558
|
+
*
|
|
1559
|
+
* @extends EQN_Symbol
|
|
1560
|
+
*
|
|
1561
|
+
* @example
|
|
1562
|
+
* // Define in element
|
|
1563
|
+
* figure.add({
|
|
1564
|
+
* make: 'equation',
|
|
1565
|
+
* elements: {
|
|
1566
|
+
* l: { symbol: 'line', arrow: 'barb', width: 0.005 },
|
|
1567
|
+
* },
|
|
1568
|
+
* forms: {
|
|
1569
|
+
* form1: { topComment: ['a', 'b', 'l', 0.2, 0.2] },
|
|
1570
|
+
* },
|
|
1571
|
+
* });
|
|
1572
|
+
*
|
|
1573
|
+
* @example
|
|
1574
|
+
* // Dashed line
|
|
1575
|
+
* figure.add({
|
|
1576
|
+
* make: 'equation',
|
|
1577
|
+
* elements: {
|
|
1578
|
+
* l: { symbol: 'line', dash: [0.01, 0.01], width: 0.005 },
|
|
1579
|
+
* },
|
|
1580
|
+
* forms: {
|
|
1581
|
+
* form1: { topComment: ['a', 'b', 'l', 0.2, 0.2] },
|
|
1582
|
+
* },
|
|
1583
|
+
* });
|
|
1584
|
+
*
|
|
1585
|
+
* @example
|
|
1586
|
+
* // Define inline simple one use
|
|
1587
|
+
* figure.add({
|
|
1588
|
+
* make: 'equation',
|
|
1589
|
+
* forms: {
|
|
1590
|
+
* form1: { topComment: ['a', 'b', 'line', 0.2, 0.2] },
|
|
1591
|
+
* },
|
|
1592
|
+
* });
|
|
1593
|
+
*
|
|
1594
|
+
* @example
|
|
1595
|
+
* // Define inline with reuse
|
|
1596
|
+
* const eqn = figure.add({
|
|
1597
|
+
* make: 'equation',
|
|
1598
|
+
* forms: {
|
|
1599
|
+
* form1: { topComment: ['a', 'b', 'l1_line', 0.2, 0.2] },
|
|
1600
|
+
* form2: { topComment: ['c', 'd', 'l1', 0.2, 0.2] },
|
|
1601
|
+
* },
|
|
1602
|
+
* });
|
|
1603
|
+
* eqn.animations.new()
|
|
1604
|
+
* .goToForm({ delay: 1, target: 'form2', animate: 'move' })
|
|
1605
|
+
* .start();
|
|
1606
|
+
*
|
|
1607
|
+
* @example
|
|
1608
|
+
* // Define inline with customization
|
|
1609
|
+
* figure.add({
|
|
1610
|
+
* make: 'equation',
|
|
1611
|
+
* forms: {
|
|
1612
|
+
* form1: { topComment: ['a', 'b', { line: { arrow: 'barb' } }, 0.2, 0.2] },
|
|
1613
|
+
* },
|
|
1614
|
+
* });
|
|
1615
|
+
*
|
|
1616
|
+
* @interface
|
|
1617
|
+
* @group Equation Symbols
|
|
1618
|
+
*/
|
|
1619
|
+
export type EQN_LineSymbol = {
|
|
1620
|
+
width?: number;
|
|
1621
|
+
dash?: TypeDash;
|
|
1622
|
+
arrow?: OBJ_LineArrows;
|
|
1623
|
+
} & EQN_Symbol;
|
|
1624
|
+
export type TypeSymbolOptions = EQN_VinculumSymbol & EQN_VinculumSymbol & EQN_BoxSymbol & EQN_ArrowSymbol & EQN_SumSymbol & EQN_ProdSymbol & EQN_IntegralSymbol & EQN_StrikeSymbol & EQN_BracketSymbol & EQN_AngleBracketSymbol & EQN_BraceSymbol & EQN_BarSymbol & EQN_SquareBracketSymbol & EQN_LineSymbol;
|
|
1625
|
+
export default class EquationSymbols {
|
|
1626
|
+
shapes: FigurePrimitives;
|
|
1627
|
+
defaultColor: Array<number>;
|
|
1628
|
+
constructor(shapes: FigurePrimitives, defaultColor: Array<number>);
|
|
1629
|
+
get(name: string, options: TypeSymbolOptions): Bracket | Box | Sum | Product | Integral | VinculumNew | Strike | Radical | Division | Line | null;
|
|
1630
|
+
vinculum(options: EQN_VinculumSymbol): VinculumNew;
|
|
1631
|
+
box(optionsIn: EQN_BoxSymbol): Box;
|
|
1632
|
+
division(optionsIn: EQN_DivisionSymbol): Division;
|
|
1633
|
+
line(optionsIn: EQN_LineSymbol): Line;
|
|
1634
|
+
touchBox(optionsIn: EQN_BoxSymbol): Box;
|
|
1635
|
+
arrow(options: EQN_ArrowSymbol): Arrow;
|
|
1636
|
+
sum(options: EQN_SumSymbol): Sum;
|
|
1637
|
+
product(options: EQN_ProdSymbol): Product;
|
|
1638
|
+
integral(options: EQN_IntegralSymbol): Integral;
|
|
1639
|
+
radical(optionsIn: EQN_RadicalSymbol): Radical;
|
|
1640
|
+
strike(options: EQN_StrikeSymbol): Strike;
|
|
1641
|
+
bracket(options: EQN_BracketSymbol): Bracket;
|
|
1642
|
+
angleBracket(options: EQN_AngleBracketSymbol): AngleBracket;
|
|
1643
|
+
brace(options: EQN_BraceSymbol): Brace;
|
|
1644
|
+
bar(options: EQN_BarSymbol): Bar;
|
|
1645
|
+
squareBracket(options: EQN_SquareBracketSymbol): SquareBracket;
|
|
1646
|
+
}
|