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/node.esm.js
CHANGED
|
@@ -2780,6 +2780,9 @@ var $;
|
|
|
2780
2780
|
}
|
|
2781
2781
|
return distance;
|
|
2782
2782
|
}
|
|
2783
|
+
transponed() {
|
|
2784
|
+
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2785
|
+
}
|
|
2783
2786
|
get x() { return this[0]; }
|
|
2784
2787
|
get y() { return this[1]; }
|
|
2785
2788
|
get z() { return this[2]; }
|
|
@@ -2913,6 +2916,12 @@ var $;
|
|
|
2913
2916
|
const obj = new this.$.$mol_vector_2d(this.gap_x(), this.gap_y());
|
|
2914
2917
|
return obj;
|
|
2915
2918
|
}
|
|
2919
|
+
repos_x(val) {
|
|
2920
|
+
return 0;
|
|
2921
|
+
}
|
|
2922
|
+
repos_y(val) {
|
|
2923
|
+
return 0;
|
|
2924
|
+
}
|
|
2916
2925
|
indexes() {
|
|
2917
2926
|
return [];
|
|
2918
2927
|
}
|
|
@@ -3071,14 +3080,20 @@ var $;
|
|
|
3071
3080
|
indexes() {
|
|
3072
3081
|
return this.series_x().map((_, i) => i);
|
|
3073
3082
|
}
|
|
3083
|
+
repos_x(val) {
|
|
3084
|
+
return val;
|
|
3085
|
+
}
|
|
3086
|
+
repos_y(val) {
|
|
3087
|
+
return val;
|
|
3088
|
+
}
|
|
3074
3089
|
points() {
|
|
3075
3090
|
const [shift_x, shift_y] = this.shift();
|
|
3076
3091
|
const [scale_x, scale_y] = this.scale();
|
|
3077
3092
|
const series_x = this.series_x();
|
|
3078
3093
|
const series_y = this.series_y();
|
|
3079
3094
|
return this.indexes().map(index => {
|
|
3080
|
-
let point_x = Math.round(shift_x + series_x[index] * scale_x);
|
|
3081
|
-
let point_y = Math.round(shift_y + series_y[index] * scale_y);
|
|
3095
|
+
let point_x = Math.round(shift_x + this.repos_x(series_x[index]) * scale_x);
|
|
3096
|
+
let point_y = Math.round(shift_y + this.repos_y(series_y[index]) * scale_y);
|
|
3082
3097
|
point_x = Math.max(Number.MIN_SAFE_INTEGER, Math.min(point_x, Number.MAX_SAFE_INTEGER));
|
|
3083
3098
|
point_y = Math.max(Number.MIN_SAFE_INTEGER, Math.min(point_y, Number.MAX_SAFE_INTEGER));
|
|
3084
3099
|
return [point_x, point_y];
|
|
@@ -3092,7 +3107,7 @@ var $;
|
|
|
3092
3107
|
const series_x = this.series_x();
|
|
3093
3108
|
const series_y = this.series_y();
|
|
3094
3109
|
for (let i = 0; i < series_x.length; i++) {
|
|
3095
|
-
next = next.expanded1([series_x[i], series_y[i]]);
|
|
3110
|
+
next = next.expanded1([this.repos_x(series_x[i]), this.repos_y(series_y[i])]);
|
|
3096
3111
|
}
|
|
3097
3112
|
return next;
|
|
3098
3113
|
}
|
|
@@ -4194,7 +4209,7 @@ var $;
|
|
|
4194
4209
|
: point.y > viewport_top ? 1
|
|
4195
4210
|
: 0);
|
|
4196
4211
|
for (let i = 0; i < series_x.length - 1; i++) {
|
|
4197
|
-
const scaled = new $.$mol_vector_2d(Math.round(shift_x + series_x[i] * scale_x), Math.round(shift_y + series_y[i] * scale_y));
|
|
4212
|
+
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));
|
|
4198
4213
|
if (Math.abs(scaled.x - last.x) < threshold
|
|
4199
4214
|
&& Math.abs(scaled.y - last.y) < threshold)
|
|
4200
4215
|
continue;
|
|
@@ -4277,6 +4292,8 @@ var $;
|
|
|
4277
4292
|
graph.cursor_position = () => this.cursor_position();
|
|
4278
4293
|
graph.gap = () => this.gap();
|
|
4279
4294
|
graph.title = () => this.title();
|
|
4295
|
+
graph.repos_x = val => this.repos_x(val);
|
|
4296
|
+
graph.repos_y = val => this.repos_y(val);
|
|
4280
4297
|
}
|
|
4281
4298
|
return graphs;
|
|
4282
4299
|
}
|
|
@@ -4444,8 +4461,8 @@ var $;
|
|
|
4444
4461
|
do {
|
|
4445
4462
|
indexes = [];
|
|
4446
4463
|
for (let i = 0; i < series_x.length; i++) {
|
|
4447
|
-
const point_x = series_x[i];
|
|
4448
|
-
const point_y = series_y[i];
|
|
4464
|
+
const point_x = this.repos_x(series_x[i]);
|
|
4465
|
+
const point_y = this.repos_y(series_y[i]);
|
|
4449
4466
|
const scaled_x = Math.round(shift_x + point_x * scale_x);
|
|
4450
4467
|
const scaled_y = Math.round(shift_y + point_y * scale_y);
|
|
4451
4468
|
if (Math.abs(scaled_x - last_x) < radius
|