mol_plot_all 1.2.239 → 1.2.240
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 +12 -5
- package/node.deps.json +1 -1
- package/node.esm.js +36 -9
- package/node.esm.js.map +1 -1
- package/node.js +36 -9
- package/node.js.map +1 -1
- package/node.test.js +36 -9
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +12 -5
- package/web.deps.json +1 -1
- package/web.esm.js +36 -9
- package/web.esm.js.map +1 -1
- package/web.js +36 -9
- package/web.js.map +1 -1
package/node.js
CHANGED
|
@@ -2765,8 +2765,11 @@ var $;
|
|
|
2765
2765
|
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2766
2766
|
}
|
|
2767
2767
|
get x() { return this[0]; }
|
|
2768
|
+
set x(next) { this[0] = next; }
|
|
2768
2769
|
get y() { return this[1]; }
|
|
2770
|
+
set y(next) { this[1] = next; }
|
|
2769
2771
|
get z() { return this[2]; }
|
|
2772
|
+
set z(next) { this[2] = next; }
|
|
2770
2773
|
}
|
|
2771
2774
|
$.$mol_vector = $mol_vector;
|
|
2772
2775
|
class $mol_vector_1d extends $mol_vector {
|
|
@@ -2779,10 +2782,17 @@ var $;
|
|
|
2779
2782
|
}
|
|
2780
2783
|
$.$mol_vector_3d = $mol_vector_3d;
|
|
2781
2784
|
class $mol_vector_range extends $mol_vector {
|
|
2782
|
-
|
|
2783
|
-
|
|
2785
|
+
0;
|
|
2786
|
+
1;
|
|
2787
|
+
constructor(min, max) {
|
|
2788
|
+
super(min, max);
|
|
2789
|
+
this[0] = min;
|
|
2790
|
+
this[1] = max;
|
|
2791
|
+
}
|
|
2784
2792
|
get min() { return this[0]; }
|
|
2793
|
+
set min(next) { this[0] = next; }
|
|
2785
2794
|
get max() { return this[1]; }
|
|
2795
|
+
set max(next) { this[1] = next; }
|
|
2786
2796
|
get inversed() {
|
|
2787
2797
|
return new this.constructor(this.max, this.min);
|
|
2788
2798
|
}
|
|
@@ -3088,7 +3098,14 @@ var $;
|
|
|
3088
3098
|
const series_x = this.series_x();
|
|
3089
3099
|
const series_y = this.series_y();
|
|
3090
3100
|
for (let i = 0; i < series_x.length; i++) {
|
|
3091
|
-
|
|
3101
|
+
if (series_x[i] > next.x.max)
|
|
3102
|
+
next.x.max = series_x[i];
|
|
3103
|
+
if (series_x[i] < next.x.min)
|
|
3104
|
+
next.x.min = series_x[i];
|
|
3105
|
+
if (series_y[i] > next.y.max)
|
|
3106
|
+
next.y.max = series_y[i];
|
|
3107
|
+
if (series_y[i] < next.y.min)
|
|
3108
|
+
next.y.min = series_y[i];
|
|
3092
3109
|
}
|
|
3093
3110
|
return next;
|
|
3094
3111
|
}
|
|
@@ -4442,16 +4459,17 @@ var $;
|
|
|
4442
4459
|
"use strict";
|
|
4443
4460
|
var $;
|
|
4444
4461
|
(function ($) {
|
|
4445
|
-
|
|
4446
|
-
|
|
4462
|
+
const mask = 0b11111_11111_11111;
|
|
4463
|
+
function $mol_coord_pack(high, low) {
|
|
4464
|
+
return (high << 17 >>> 2) | (low & mask);
|
|
4447
4465
|
}
|
|
4448
4466
|
$.$mol_coord_pack = $mol_coord_pack;
|
|
4449
|
-
function $mol_coord_high(
|
|
4450
|
-
return
|
|
4467
|
+
function $mol_coord_high(pack) {
|
|
4468
|
+
return pack << 2 >> 17;
|
|
4451
4469
|
}
|
|
4452
4470
|
$.$mol_coord_high = $mol_coord_high;
|
|
4453
|
-
function $mol_coord_low(
|
|
4454
|
-
return (
|
|
4471
|
+
function $mol_coord_low(pack) {
|
|
4472
|
+
return (pack << 17) >> 17;
|
|
4455
4473
|
}
|
|
4456
4474
|
$.$mol_coord_low = $mol_coord_low;
|
|
4457
4475
|
})($ || ($ = {}));
|
|
@@ -4537,6 +4555,12 @@ var $;
|
|
|
4537
4555
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4538
4556
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4539
4557
|
}
|
|
4558
|
+
dimensions() {
|
|
4559
|
+
const scale = this.scale();
|
|
4560
|
+
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4561
|
+
const dims = super.dimensions();
|
|
4562
|
+
return new this.$.$mol_vector_2d(new $mol_vector_range(dims.x.min - radius, dims.x.max + radius), new $mol_vector_range(dims.y.min - radius, dims.y.max + radius));
|
|
4563
|
+
}
|
|
4540
4564
|
}
|
|
4541
4565
|
__decorate([
|
|
4542
4566
|
$mol_mem
|
|
@@ -4544,6 +4568,9 @@ var $;
|
|
|
4544
4568
|
__decorate([
|
|
4545
4569
|
$mol_mem
|
|
4546
4570
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4571
|
+
__decorate([
|
|
4572
|
+
$mol_mem
|
|
4573
|
+
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4547
4574
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4548
4575
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4549
4576
|
})($ || ($ = {}));
|