notations 0.0.46 → 0.0.49
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/lib/cjs/beats.d.ts +34 -69
- package/lib/cjs/beats.js +178 -439
- package/lib/cjs/beats.js.map +1 -1
- package/lib/cjs/beatutils.d.ts +3 -0
- package/lib/cjs/beatutils.js +64 -0
- package/lib/cjs/beatutils.js.map +1 -0
- package/lib/cjs/beatview.d.ts +18 -0
- package/lib/cjs/beatview.js +62 -0
- package/lib/cjs/beatview.js.map +1 -0
- package/lib/cjs/carnatic/LineView.d.ts +2 -7
- package/lib/cjs/carnatic/LineView.js +13 -31
- package/lib/cjs/carnatic/LineView.js.map +1 -1
- package/lib/cjs/carnatic/NotationView.d.ts +8 -7
- package/lib/cjs/carnatic/NotationView.js +76 -153
- package/lib/cjs/carnatic/NotationView.js.map +1 -1
- package/lib/cjs/carnatic/atomviews.js +149 -287
- package/lib/cjs/carnatic/atomviews.js.map +1 -1
- package/lib/cjs/carnatic/beatviews.d.ts +4 -13
- package/lib/cjs/carnatic/beatviews.js +23 -118
- package/lib/cjs/carnatic/beatviews.js.map +1 -1
- package/lib/cjs/carnatic/embelishments.d.ts +1 -1
- package/lib/cjs/carnatic/embelishments.js +189 -283
- package/lib/cjs/carnatic/embelishments.js.map +1 -1
- package/lib/cjs/carnatic/gamakas.js +15 -47
- package/lib/cjs/carnatic/gamakas.js.map +1 -1
- package/lib/cjs/commands.js +111 -271
- package/lib/cjs/commands.js.map +1 -1
- package/lib/cjs/core.d.ts +14 -1
- package/lib/cjs/core.js +291 -477
- package/lib/cjs/core.js.map +1 -1
- package/lib/cjs/cycle.js +175 -367
- package/lib/cjs/cycle.js.map +1 -1
- package/lib/cjs/entity.js +48 -102
- package/lib/cjs/entity.js.map +1 -1
- package/lib/cjs/grids.d.ts +125 -0
- package/lib/cjs/grids.js +550 -0
- package/lib/cjs/grids.js.map +1 -0
- package/lib/cjs/iterators.js +96 -234
- package/lib/cjs/iterators.js.map +1 -1
- package/lib/cjs/layouts.d.ts +1 -1
- package/lib/cjs/layouts.js +62 -98
- package/lib/cjs/layouts.js.map +1 -1
- package/lib/cjs/loader.d.ts +2 -2
- package/lib/cjs/loader.js +23 -123
- package/lib/cjs/loader.js.map +1 -1
- package/lib/cjs/notation.d.ts +0 -3
- package/lib/cjs/notation.js +139 -241
- package/lib/cjs/notation.js.map +1 -1
- package/lib/cjs/parser.d.ts +2 -0
- package/lib/cjs/parser.js +225 -214
- package/lib/cjs/parser.js.map +1 -1
- package/lib/cjs/shapes.js +149 -283
- package/lib/cjs/shapes.js.map +1 -1
- package/lib/cjs/utils.d.ts +8 -0
- package/lib/cjs/utils.js +60 -55
- package/lib/cjs/utils.js.map +1 -1
- package/lib/esm/beats.d.ts +34 -69
- package/lib/esm/beats.js +172 -438
- package/lib/esm/beats.js.map +1 -1
- package/lib/esm/beatutils.d.ts +3 -0
- package/lib/esm/beatutils.js +37 -0
- package/lib/esm/beatutils.js.map +1 -0
- package/lib/esm/beatview.d.ts +18 -0
- package/lib/esm/beatview.js +35 -0
- package/lib/esm/beatview.js.map +1 -0
- package/lib/esm/carnatic/LineView.d.ts +2 -7
- package/lib/esm/carnatic/LineView.js +12 -31
- package/lib/esm/carnatic/LineView.js.map +1 -1
- package/lib/esm/carnatic/NotationView.d.ts +8 -7
- package/lib/esm/carnatic/NotationView.js +74 -152
- package/lib/esm/carnatic/NotationView.js.map +1 -1
- package/lib/esm/carnatic/atomviews.js +144 -284
- package/lib/esm/carnatic/atomviews.js.map +1 -1
- package/lib/esm/carnatic/beatviews.d.ts +4 -13
- package/lib/esm/carnatic/beatviews.js +21 -94
- package/lib/esm/carnatic/beatviews.js.map +1 -1
- package/lib/esm/carnatic/embelishments.d.ts +1 -1
- package/lib/esm/carnatic/embelishments.js +187 -296
- package/lib/esm/carnatic/embelishments.js.map +1 -1
- package/lib/esm/carnatic/gamakas.js +14 -48
- package/lib/esm/carnatic/gamakas.js.map +1 -1
- package/lib/esm/commands.js +100 -271
- package/lib/esm/commands.js.map +1 -1
- package/lib/esm/core.d.ts +14 -1
- package/lib/esm/core.js +287 -484
- package/lib/esm/core.js.map +1 -1
- package/lib/esm/cycle.js +172 -367
- package/lib/esm/cycle.js.map +1 -1
- package/lib/esm/entity.js +48 -104
- package/lib/esm/entity.js.map +1 -1
- package/lib/esm/grids.d.ts +125 -0
- package/lib/esm/grids.js +517 -0
- package/lib/esm/grids.js.map +1 -0
- package/lib/esm/iterators.js +93 -235
- package/lib/esm/iterators.js.map +1 -1
- package/lib/esm/layouts.d.ts +1 -1
- package/lib/esm/layouts.js +60 -97
- package/lib/esm/layouts.js.map +1 -1
- package/lib/esm/loader.d.ts +2 -2
- package/lib/esm/loader.js +20 -120
- package/lib/esm/loader.js.map +1 -1
- package/lib/esm/notation.d.ts +0 -3
- package/lib/esm/notation.js +135 -242
- package/lib/esm/notation.js.map +1 -1
- package/lib/esm/parser.d.ts +2 -0
- package/lib/esm/parser.js +220 -210
- package/lib/esm/parser.js.map +1 -1
- package/lib/esm/shapes.js +148 -288
- package/lib/esm/shapes.js.map +1 -1
- package/lib/esm/utils.d.ts +8 -0
- package/lib/esm/utils.js +55 -51
- package/lib/esm/utils.js.map +1 -1
- package/package.json +18 -17
|
@@ -1,188 +1,144 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __values = (this && this.__values) || function(o) {
|
|
17
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
18
|
-
if (m) return m.call(o);
|
|
19
|
-
if (o && typeof o.length === "number") return {
|
|
20
|
-
next: function () {
|
|
21
|
-
if (o && i >= o.length) o = void 0;
|
|
22
|
-
return { value: o && o[i++], done: !o };
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
26
|
-
};
|
|
27
1
|
import * as TSU from "@panyam/tsutils";
|
|
28
2
|
import { Embelishment } from "../shapes";
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_this.dotRadius = 1;
|
|
46
|
-
_this.dotSpacing = 2.5;
|
|
47
|
-
var rootElem = _this.noteView.embRoot();
|
|
48
|
-
var numDots = Math.abs(note.octave);
|
|
49
|
-
_this.dotsElem = TSU.DOM.createSVGNode("g", {
|
|
3
|
+
export class LeafAtomViewEmbelishment extends Embelishment {
|
|
4
|
+
constructor(atomView) {
|
|
5
|
+
super();
|
|
6
|
+
this.atomView = atomView;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export class OctaveIndicator extends LeafAtomViewEmbelishment {
|
|
10
|
+
constructor(noteView, note) {
|
|
11
|
+
super(noteView);
|
|
12
|
+
this.noteView = noteView;
|
|
13
|
+
this.note = note;
|
|
14
|
+
this.dotRadius = 1;
|
|
15
|
+
this.dotSpacing = 2.5;
|
|
16
|
+
const rootElem = this.noteView.embRoot();
|
|
17
|
+
const numDots = Math.abs(note.octave);
|
|
18
|
+
this.dotsElem = TSU.DOM.createSVGNode("g", {
|
|
50
19
|
doc: document,
|
|
51
20
|
parent: rootElem,
|
|
52
21
|
attrs: {
|
|
53
|
-
width:
|
|
54
|
-
height:
|
|
55
|
-
source: "atom" +
|
|
22
|
+
width: this.dotRadius * 2 * numDots + (numDots - 1) * this.dotSpacing,
|
|
23
|
+
height: this.dotRadius * 2,
|
|
24
|
+
source: "atom" + this.noteView.leafAtom.uuid,
|
|
56
25
|
},
|
|
57
26
|
});
|
|
58
|
-
|
|
59
|
-
for (
|
|
27
|
+
let cx = 0;
|
|
28
|
+
for (let i = 0; i < numDots; i++) {
|
|
60
29
|
TSU.DOM.createSVGNode("circle", {
|
|
61
30
|
doc: document,
|
|
62
|
-
parent:
|
|
31
|
+
parent: this.dotsElem,
|
|
63
32
|
attrs: {
|
|
64
33
|
cx: cx,
|
|
65
34
|
cy: 0,
|
|
66
|
-
r:
|
|
35
|
+
r: this.dotRadius,
|
|
67
36
|
stroke: "black",
|
|
68
37
|
"stroke-width": "1",
|
|
69
38
|
},
|
|
70
39
|
});
|
|
71
|
-
cx +=
|
|
40
|
+
cx += this.dotRadius + this.dotRadius + this.dotSpacing;
|
|
72
41
|
}
|
|
73
|
-
return _this;
|
|
74
42
|
}
|
|
75
|
-
|
|
43
|
+
refreshBBox() {
|
|
76
44
|
return TSU.DOM.svgBBox(this.dotsElem);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
}
|
|
46
|
+
refreshMinSize() {
|
|
47
|
+
const numDots = Math.abs(this.note.octave);
|
|
80
48
|
return {
|
|
81
49
|
width: this.dotRadius * 2 * numDots + (numDots - 1) * this.dotSpacing,
|
|
82
50
|
height: this.dotRadius * 2,
|
|
83
51
|
};
|
|
84
|
-
}
|
|
85
|
-
|
|
52
|
+
}
|
|
53
|
+
updateBounds(x, y, w, h) {
|
|
86
54
|
if (x == null)
|
|
87
55
|
x = this.x;
|
|
88
56
|
if (y == null)
|
|
89
57
|
y = this.y;
|
|
90
58
|
return [x, y, null, null];
|
|
91
|
-
}
|
|
92
|
-
|
|
59
|
+
}
|
|
60
|
+
refreshLayout() {
|
|
93
61
|
this.dotsElem.setAttribute("transform", "translate(" + this.x + "," + this.y + ")");
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
_this.atomView = atomView;
|
|
104
|
-
var rootElem = _this.atomView.embRoot();
|
|
105
|
-
_this.labelElem = TSU.DOM.createSVGNode("text", {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export class LabelEmbelishment extends LeafAtomViewEmbelishment {
|
|
65
|
+
constructor(label, atomView) {
|
|
66
|
+
super(atomView);
|
|
67
|
+
this.label = label;
|
|
68
|
+
this.atomView = atomView;
|
|
69
|
+
const rootElem = this.atomView.embRoot();
|
|
70
|
+
this.labelElem = TSU.DOM.createSVGNode("text", {
|
|
106
71
|
doc: document,
|
|
107
72
|
parent: rootElem,
|
|
108
73
|
text: label,
|
|
109
74
|
attrs: {
|
|
110
|
-
source: "atom" +
|
|
75
|
+
source: "atom" + this.atomView.leafAtom.uuid,
|
|
111
76
|
"dominant-baseline": "hanging",
|
|
112
77
|
},
|
|
113
78
|
});
|
|
114
|
-
return _this;
|
|
115
79
|
}
|
|
116
|
-
|
|
80
|
+
refreshBBox() {
|
|
117
81
|
return TSU.DOM.svgBBox(this.labelElem);
|
|
118
|
-
}
|
|
119
|
-
|
|
82
|
+
}
|
|
83
|
+
refreshMinSize() {
|
|
120
84
|
return TSU.DOM.svgBBox(this.labelElem);
|
|
121
|
-
}
|
|
122
|
-
|
|
85
|
+
}
|
|
86
|
+
updateBounds(x, y, w, h) {
|
|
123
87
|
return [x, y, w, h];
|
|
124
|
-
}
|
|
125
|
-
|
|
88
|
+
}
|
|
89
|
+
refreshLayout() {
|
|
126
90
|
this.labelElem.setAttribute("x", "" + this.x);
|
|
127
91
|
this.labelElem.setAttribute("y", "" + this.y);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
_this.rootElement = rootElement;
|
|
138
|
-
_this.barSpacing = 10;
|
|
139
|
-
_this.line = TSU.DOM.createSVGNode("line", {
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export class BeatStartLines extends Embelishment {
|
|
95
|
+
constructor(source, rootElement) {
|
|
96
|
+
super();
|
|
97
|
+
this.source = source;
|
|
98
|
+
this.rootElement = rootElement;
|
|
99
|
+
this.barSpacing = 10;
|
|
100
|
+
this.line = TSU.DOM.createSVGNode("line", {
|
|
140
101
|
doc: document,
|
|
141
|
-
parent:
|
|
102
|
+
parent: this.rootElement,
|
|
142
103
|
attrs: {
|
|
143
104
|
stroke: "black",
|
|
144
105
|
"stroke-width": "1",
|
|
145
106
|
class: "bar-start-line",
|
|
146
107
|
},
|
|
147
108
|
});
|
|
148
|
-
return _this;
|
|
149
109
|
}
|
|
150
|
-
|
|
110
|
+
refreshBBox() {
|
|
151
111
|
return new TSU.Geom.Rect(0, 0, 0, 0);
|
|
152
|
-
}
|
|
153
|
-
|
|
112
|
+
}
|
|
113
|
+
refreshMinSize() {
|
|
154
114
|
return new TSU.Geom.Rect(0, 0, 0, 0);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
115
|
+
}
|
|
116
|
+
refreshLayout() {
|
|
117
|
+
const line = this.line;
|
|
118
|
+
const x = this.source.x - this.barSpacing;
|
|
159
119
|
line.setAttribute("x1", "" + x);
|
|
160
120
|
line.setAttribute("x2", "" + x);
|
|
161
|
-
|
|
162
|
-
|
|
121
|
+
const y = this.source.y + this.source.bbox.y;
|
|
122
|
+
const h = this.source.bbox.height;
|
|
163
123
|
line.setAttribute("y1", "" + y);
|
|
164
124
|
line.setAttribute("y2", "" + (y + h));
|
|
165
|
-
}
|
|
166
|
-
|
|
125
|
+
}
|
|
126
|
+
updateBounds(x, y, w, h) {
|
|
167
127
|
return [x, y, null, h];
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
_this.barSpacing = 15;
|
|
181
|
-
_this.lines = [];
|
|
182
|
-
for (var i = 0; i < nLines; i++) {
|
|
183
|
-
_this.lines.push(TSU.DOM.createSVGNode("line", {
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export class BeatEndLines extends Embelishment {
|
|
131
|
+
constructor(source, rootElement, nLines = 1) {
|
|
132
|
+
super();
|
|
133
|
+
this.source = source;
|
|
134
|
+
this.rootElement = rootElement;
|
|
135
|
+
this.lineSpacing = 2;
|
|
136
|
+
this.barSpacing = 15;
|
|
137
|
+
this.lines = [];
|
|
138
|
+
for (let i = 0; i < nLines; i++) {
|
|
139
|
+
this.lines.push(TSU.DOM.createSVGNode("line", {
|
|
184
140
|
doc: document,
|
|
185
|
-
parent:
|
|
141
|
+
parent: this.rootElement,
|
|
186
142
|
attrs: {
|
|
187
143
|
stroke: "black",
|
|
188
144
|
"stroke-width": "1",
|
|
@@ -190,176 +146,113 @@ var BeatEndLines = (function (_super) {
|
|
|
190
146
|
},
|
|
191
147
|
}));
|
|
192
148
|
}
|
|
193
|
-
return _this;
|
|
194
149
|
}
|
|
195
|
-
|
|
150
|
+
refreshBBox() {
|
|
196
151
|
return new TSU.Geom.Rect(0, 0, 0, 0);
|
|
197
|
-
}
|
|
198
|
-
|
|
152
|
+
}
|
|
153
|
+
refreshMinSize() {
|
|
199
154
|
return new TSU.Geom.Rect(0, 0, 0, 0);
|
|
200
|
-
}
|
|
201
|
-
|
|
155
|
+
}
|
|
156
|
+
updatePosition(x, y) {
|
|
202
157
|
return [x, y];
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
line.setAttribute("x1", lx);
|
|
215
|
-
line.setAttribute("x2", lx);
|
|
216
|
-
currX += 4;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
220
|
-
finally {
|
|
221
|
-
try {
|
|
222
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
223
|
-
}
|
|
224
|
-
finally { if (e_1) throw e_1.error; }
|
|
225
|
-
}
|
|
226
|
-
try {
|
|
227
|
-
for (var _e = __values(this.lines), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
228
|
-
var line = _f.value;
|
|
229
|
-
line.setAttribute("y1", "" + y);
|
|
230
|
-
line.setAttribute("y2", "" + (y + h));
|
|
231
|
-
}
|
|
158
|
+
}
|
|
159
|
+
refreshLayout() {
|
|
160
|
+
const x = this.source.x + this.source.width + this.barSpacing;
|
|
161
|
+
const y = this.source.y + this.source.bbox.y;
|
|
162
|
+
const h = this.source.bbox.height;
|
|
163
|
+
let currX = x;
|
|
164
|
+
for (const line of this.lines) {
|
|
165
|
+
const lx = "" + currX;
|
|
166
|
+
line.setAttribute("x1", lx);
|
|
167
|
+
line.setAttribute("x2", lx);
|
|
168
|
+
currX += 4;
|
|
232
169
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
237
|
-
}
|
|
238
|
-
finally { if (e_2) throw e_2.error; }
|
|
170
|
+
for (const line of this.lines) {
|
|
171
|
+
line.setAttribute("y1", "" + y);
|
|
172
|
+
line.setAttribute("y2", "" + (y + h));
|
|
239
173
|
}
|
|
240
|
-
}
|
|
241
|
-
|
|
174
|
+
}
|
|
175
|
+
updateBounds(x, y, w, h) {
|
|
242
176
|
return [null, null, null, null];
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
export { Kandippu };
|
|
307
|
-
var Vaali = (function (_super) {
|
|
308
|
-
__extends(Vaali, _super);
|
|
309
|
-
function Vaali(atomView) {
|
|
310
|
-
var _this = _super.call(this, "⌒", atomView) || this;
|
|
311
|
-
_this.atomView = atomView;
|
|
312
|
-
return _this;
|
|
313
|
-
}
|
|
314
|
-
return Vaali;
|
|
315
|
-
}(LabelEmbelishment));
|
|
316
|
-
export { Vaali };
|
|
317
|
-
var Odukkal = (function (_super) {
|
|
318
|
-
__extends(Odukkal, _super);
|
|
319
|
-
function Odukkal(atomView) {
|
|
320
|
-
var _this = _super.call(this, "x", atomView) || this;
|
|
321
|
-
_this.atomView = atomView;
|
|
322
|
-
return _this;
|
|
323
|
-
}
|
|
324
|
-
return Odukkal;
|
|
325
|
-
}(LabelEmbelishment));
|
|
326
|
-
export { Odukkal };
|
|
327
|
-
var Orikkai = (function (_super) {
|
|
328
|
-
__extends(Orikkai, _super);
|
|
329
|
-
function Orikkai(atomView) {
|
|
330
|
-
var _this = _super.call(this, "γ", atomView) || this;
|
|
331
|
-
_this.atomView = atomView;
|
|
332
|
-
return _this;
|
|
333
|
-
}
|
|
334
|
-
return Orikkai;
|
|
335
|
-
}(LabelEmbelishment));
|
|
336
|
-
export { Orikkai };
|
|
337
|
-
var Jaaru = (function (_super) {
|
|
338
|
-
__extends(Jaaru, _super);
|
|
339
|
-
function Jaaru(jaaru, atomView) {
|
|
340
|
-
var _this = _super.call(this, atomView) || this;
|
|
341
|
-
_this.jaaru = jaaru;
|
|
342
|
-
_this.atomView = atomView;
|
|
343
|
-
var rootElem = _this.atomView.embRoot();
|
|
344
|
-
_this.pathElem = TSU.DOM.createSVGNode("path", {
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
export class Kampitham extends LabelEmbelishment {
|
|
180
|
+
constructor(atomView) {
|
|
181
|
+
super("~", atomView);
|
|
182
|
+
this.atomView = atomView;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export class Nokku extends LabelEmbelishment {
|
|
186
|
+
constructor(atomView) {
|
|
187
|
+
super("w", atomView);
|
|
188
|
+
this.atomView = atomView;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
export class Prathyagatham extends LabelEmbelishment {
|
|
192
|
+
constructor(atomView) {
|
|
193
|
+
super("∵", atomView);
|
|
194
|
+
this.atomView = atomView;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
export class Spuritham extends LabelEmbelishment {
|
|
198
|
+
constructor(atomView) {
|
|
199
|
+
super("∴", atomView);
|
|
200
|
+
this.atomView = atomView;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export class Raavi extends LabelEmbelishment {
|
|
204
|
+
constructor(atomView) {
|
|
205
|
+
super("^", atomView);
|
|
206
|
+
this.atomView = atomView;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export class Kandippu extends LabelEmbelishment {
|
|
210
|
+
constructor(atomView) {
|
|
211
|
+
super("✓", atomView);
|
|
212
|
+
this.atomView = atomView;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
export class Vaali extends LabelEmbelishment {
|
|
216
|
+
constructor(atomView) {
|
|
217
|
+
super("⌒", atomView);
|
|
218
|
+
this.atomView = atomView;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
export class Odukkal extends LabelEmbelishment {
|
|
222
|
+
constructor(atomView) {
|
|
223
|
+
super("x", atomView);
|
|
224
|
+
this.atomView = atomView;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
export class Orikkai extends LabelEmbelishment {
|
|
228
|
+
constructor(atomView) {
|
|
229
|
+
super("γ", atomView);
|
|
230
|
+
this.atomView = atomView;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
export class Jaaru extends LeafAtomViewEmbelishment {
|
|
234
|
+
constructor(jaaru, atomView) {
|
|
235
|
+
super(atomView);
|
|
236
|
+
this.jaaru = jaaru;
|
|
237
|
+
this.atomView = atomView;
|
|
238
|
+
const rootElem = this.atomView.embRoot();
|
|
239
|
+
this.pathElem = TSU.DOM.createSVGNode("path", {
|
|
345
240
|
doc: document,
|
|
346
241
|
parent: rootElem,
|
|
347
242
|
attrs: {
|
|
348
|
-
source: "atom" +
|
|
243
|
+
source: "atom" + this.atomView.leafAtom.uuid,
|
|
349
244
|
stroke: "black",
|
|
350
245
|
fill: "transparent",
|
|
351
|
-
d:
|
|
246
|
+
d: this.pathAttribute(),
|
|
352
247
|
},
|
|
353
248
|
});
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
var x2 = x + h2;
|
|
362
|
-
var y = this.atomView.y;
|
|
249
|
+
}
|
|
250
|
+
pathAttribute(x = 0) {
|
|
251
|
+
const avbbox = this.atomView.glyph.minSize;
|
|
252
|
+
let y2 = 0;
|
|
253
|
+
const h2 = avbbox.height / 2;
|
|
254
|
+
const x2 = x + h2;
|
|
255
|
+
let y = this.atomView.y;
|
|
363
256
|
if (this.jaaru.ascending) {
|
|
364
257
|
y += avbbox.height;
|
|
365
258
|
y2 = y - h2;
|
|
@@ -368,21 +261,19 @@ var Jaaru = (function (_super) {
|
|
|
368
261
|
y -= h2;
|
|
369
262
|
y2 = y + h2;
|
|
370
263
|
}
|
|
371
|
-
return [
|
|
372
|
-
}
|
|
373
|
-
|
|
264
|
+
return [`M ${x} ${y}`, `Q ${x2} ${y} ${x2} ${y2}`].join(" ");
|
|
265
|
+
}
|
|
266
|
+
refreshMinSize() {
|
|
374
267
|
return TSU.DOM.svgBBox(this.pathElem);
|
|
375
|
-
}
|
|
376
|
-
|
|
268
|
+
}
|
|
269
|
+
refreshBBox() {
|
|
377
270
|
return TSU.DOM.svgBBox(this.pathElem);
|
|
378
|
-
}
|
|
379
|
-
|
|
271
|
+
}
|
|
272
|
+
updateBounds(x, y, w, h) {
|
|
380
273
|
return [x, null, null, null];
|
|
381
|
-
}
|
|
382
|
-
|
|
274
|
+
}
|
|
275
|
+
refreshLayout() {
|
|
383
276
|
this.pathElem.setAttribute("d", this.pathAttribute(this.x));
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
}(LeafAtomViewEmbelishment));
|
|
387
|
-
export { Jaaru };
|
|
277
|
+
}
|
|
278
|
+
}
|
|
388
279
|
//# sourceMappingURL=embelishments.js.map
|