mol_plot_all 1.2.117 → 1.2.121
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/node.d.ts +5 -0
- package/node.deps.json +1 -1
- package/node.esm.js +23 -6
- package/node.esm.js.map +1 -1
- package/node.js +23 -6
- package/node.js.map +1 -1
- package/node.test.js +23 -6
- package/node.test.js.map +1 -1
- package/node.view.tree +2 -0
- package/package.json +1 -1
- package/web.d.ts +5 -0
- package/web.deps.json +1 -1
- package/web.esm.js +23 -6
- package/web.esm.js.map +1 -1
- package/web.js +23 -6
- package/web.js.map +1 -1
- package/web.view.tree +2 -0
package/web.esm.js
CHANGED
|
@@ -2487,6 +2487,9 @@ var $;
|
|
|
2487
2487
|
}
|
|
2488
2488
|
return distance;
|
|
2489
2489
|
}
|
|
2490
|
+
transponed() {
|
|
2491
|
+
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2492
|
+
}
|
|
2490
2493
|
get x() { return this[0]; }
|
|
2491
2494
|
get y() { return this[1]; }
|
|
2492
2495
|
get z() { return this[2]; }
|
|
@@ -2620,6 +2623,12 @@ var $;
|
|
|
2620
2623
|
const obj = new this.$.$mol_vector_2d(this.gap_x(), this.gap_y());
|
|
2621
2624
|
return obj;
|
|
2622
2625
|
}
|
|
2626
|
+
repos_x(val) {
|
|
2627
|
+
return 0;
|
|
2628
|
+
}
|
|
2629
|
+
repos_y(val) {
|
|
2630
|
+
return 0;
|
|
2631
|
+
}
|
|
2623
2632
|
indexes() {
|
|
2624
2633
|
return [];
|
|
2625
2634
|
}
|
|
@@ -2778,14 +2787,20 @@ var $;
|
|
|
2778
2787
|
indexes() {
|
|
2779
2788
|
return this.series_x().map((_, i) => i);
|
|
2780
2789
|
}
|
|
2790
|
+
repos_x(val) {
|
|
2791
|
+
return val;
|
|
2792
|
+
}
|
|
2793
|
+
repos_y(val) {
|
|
2794
|
+
return val;
|
|
2795
|
+
}
|
|
2781
2796
|
points() {
|
|
2782
2797
|
const [shift_x, shift_y] = this.shift();
|
|
2783
2798
|
const [scale_x, scale_y] = this.scale();
|
|
2784
2799
|
const series_x = this.series_x();
|
|
2785
2800
|
const series_y = this.series_y();
|
|
2786
2801
|
return this.indexes().map(index => {
|
|
2787
|
-
let point_x = Math.round(shift_x + series_x[index] * scale_x);
|
|
2788
|
-
let point_y = Math.round(shift_y + series_y[index] * scale_y);
|
|
2802
|
+
let point_x = Math.round(shift_x + this.repos_x(series_x[index]) * scale_x);
|
|
2803
|
+
let point_y = Math.round(shift_y + this.repos_y(series_y[index]) * scale_y);
|
|
2789
2804
|
point_x = Math.max(Number.MIN_SAFE_INTEGER, Math.min(point_x, Number.MAX_SAFE_INTEGER));
|
|
2790
2805
|
point_y = Math.max(Number.MIN_SAFE_INTEGER, Math.min(point_y, Number.MAX_SAFE_INTEGER));
|
|
2791
2806
|
return [point_x, point_y];
|
|
@@ -2799,7 +2814,7 @@ var $;
|
|
|
2799
2814
|
const series_x = this.series_x();
|
|
2800
2815
|
const series_y = this.series_y();
|
|
2801
2816
|
for (let i = 0; i < series_x.length; i++) {
|
|
2802
|
-
next = next.expanded1([series_x[i], series_y[i]]);
|
|
2817
|
+
next = next.expanded1([this.repos_x(series_x[i]), this.repos_y(series_y[i])]);
|
|
2803
2818
|
}
|
|
2804
2819
|
return next;
|
|
2805
2820
|
}
|
|
@@ -3901,7 +3916,7 @@ var $;
|
|
|
3901
3916
|
: point.y > viewport_top ? 1
|
|
3902
3917
|
: 0);
|
|
3903
3918
|
for (let i = 0; i < series_x.length - 1; i++) {
|
|
3904
|
-
const scaled = new $.$mol_vector_2d(Math.round(shift_x + series_x[i] * scale_x), Math.round(shift_y + series_y[i] * scale_y));
|
|
3919
|
+
const scaled = new $.$mol_vector_2d(Math.round(shift_x + this.repos_x(series_x[i]) * scale_x), Math.round(shift_y + this.repos_y(series_y[i]) * scale_y));
|
|
3905
3920
|
if (Math.abs(scaled.x - last.x) < threshold
|
|
3906
3921
|
&& Math.abs(scaled.y - last.y) < threshold)
|
|
3907
3922
|
continue;
|
|
@@ -3984,6 +3999,8 @@ var $;
|
|
|
3984
3999
|
graph.cursor_position = () => this.cursor_position();
|
|
3985
4000
|
graph.gap = () => this.gap();
|
|
3986
4001
|
graph.title = () => this.title();
|
|
4002
|
+
graph.repos_x = val => this.repos_x(val);
|
|
4003
|
+
graph.repos_y = val => this.repos_y(val);
|
|
3987
4004
|
}
|
|
3988
4005
|
return graphs;
|
|
3989
4006
|
}
|
|
@@ -4151,8 +4168,8 @@ var $;
|
|
|
4151
4168
|
do {
|
|
4152
4169
|
indexes = [];
|
|
4153
4170
|
for (let i = 0; i < series_x.length; i++) {
|
|
4154
|
-
const point_x = series_x[i];
|
|
4155
|
-
const point_y = series_y[i];
|
|
4171
|
+
const point_x = this.repos_x(series_x[i]);
|
|
4172
|
+
const point_y = this.repos_y(series_y[i]);
|
|
4156
4173
|
const scaled_x = Math.round(shift_x + point_x * scale_x);
|
|
4157
4174
|
const scaled_y = Math.round(shift_y + point_y * scale_y);
|
|
4158
4175
|
if (Math.abs(scaled_x - last_x) < radius
|