mol_plot_all 1.2.237 → 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 +16 -8
- package/node.deps.json +1 -1
- package/node.esm.js +60 -20
- package/node.esm.js.map +1 -1
- package/node.js +60 -20
- package/node.js.map +1 -1
- package/node.test.js +100 -20
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +16 -8
- package/web.deps.json +1 -1
- package/web.esm.js +70 -21
- package/web.esm.js.map +1 -1
- package/web.js +70 -21
- package/web.js.map +1 -1
- package/web.test.js +40 -0
- package/web.test.js.map +1 -1
package/node.js
CHANGED
|
@@ -1738,17 +1738,27 @@ var $;
|
|
|
1738
1738
|
};
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1741
|
+
resync(...args) {
|
|
1742
|
+
let res;
|
|
1743
|
+
try {
|
|
1744
|
+
res = this.recall(...args);
|
|
1745
|
+
}
|
|
1746
|
+
catch (error) {
|
|
1747
|
+
if (error instanceof Promise)
|
|
1748
|
+
$mol_fail_hidden(error);
|
|
1749
|
+
res = error;
|
|
1750
|
+
}
|
|
1751
|
+
try {
|
|
1752
|
+
this.once();
|
|
1753
|
+
}
|
|
1754
|
+
catch (error) {
|
|
1755
|
+
if (error instanceof Promise)
|
|
1756
|
+
$mol_fail_hidden(error);
|
|
1750
1757
|
}
|
|
1751
|
-
return this.put(
|
|
1758
|
+
return this.put(res);
|
|
1759
|
+
}
|
|
1760
|
+
recall(...args) {
|
|
1761
|
+
return this.task.call(this.host, ...args);
|
|
1752
1762
|
}
|
|
1753
1763
|
once() {
|
|
1754
1764
|
return this.sync();
|
|
@@ -1794,6 +1804,9 @@ var $;
|
|
|
1794
1804
|
return next;
|
|
1795
1805
|
}
|
|
1796
1806
|
}
|
|
1807
|
+
__decorate([
|
|
1808
|
+
$mol_wire_method
|
|
1809
|
+
], $mol_wire_atom.prototype, "resync", null);
|
|
1797
1810
|
__decorate([
|
|
1798
1811
|
$mol_wire_method
|
|
1799
1812
|
], $mol_wire_atom.prototype, "recall", null);
|
|
@@ -1841,7 +1854,7 @@ var $;
|
|
|
1841
1854
|
return atom.sync();
|
|
1842
1855
|
}
|
|
1843
1856
|
}
|
|
1844
|
-
return atom.
|
|
1857
|
+
return atom.resync(...args);
|
|
1845
1858
|
};
|
|
1846
1859
|
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1847
1860
|
Object.assign(wrapper, { orig: func });
|
|
@@ -2752,8 +2765,11 @@ var $;
|
|
|
2752
2765
|
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2753
2766
|
}
|
|
2754
2767
|
get x() { return this[0]; }
|
|
2768
|
+
set x(next) { this[0] = next; }
|
|
2755
2769
|
get y() { return this[1]; }
|
|
2770
|
+
set y(next) { this[1] = next; }
|
|
2756
2771
|
get z() { return this[2]; }
|
|
2772
|
+
set z(next) { this[2] = next; }
|
|
2757
2773
|
}
|
|
2758
2774
|
$.$mol_vector = $mol_vector;
|
|
2759
2775
|
class $mol_vector_1d extends $mol_vector {
|
|
@@ -2766,10 +2782,17 @@ var $;
|
|
|
2766
2782
|
}
|
|
2767
2783
|
$.$mol_vector_3d = $mol_vector_3d;
|
|
2768
2784
|
class $mol_vector_range extends $mol_vector {
|
|
2769
|
-
|
|
2770
|
-
|
|
2785
|
+
0;
|
|
2786
|
+
1;
|
|
2787
|
+
constructor(min, max) {
|
|
2788
|
+
super(min, max);
|
|
2789
|
+
this[0] = min;
|
|
2790
|
+
this[1] = max;
|
|
2791
|
+
}
|
|
2771
2792
|
get min() { return this[0]; }
|
|
2793
|
+
set min(next) { this[0] = next; }
|
|
2772
2794
|
get max() { return this[1]; }
|
|
2795
|
+
set max(next) { this[1] = next; }
|
|
2773
2796
|
get inversed() {
|
|
2774
2797
|
return new this.constructor(this.max, this.min);
|
|
2775
2798
|
}
|
|
@@ -3075,7 +3098,14 @@ var $;
|
|
|
3075
3098
|
const series_x = this.series_x();
|
|
3076
3099
|
const series_y = this.series_y();
|
|
3077
3100
|
for (let i = 0; i < series_x.length; i++) {
|
|
3078
|
-
|
|
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];
|
|
3079
3109
|
}
|
|
3080
3110
|
return next;
|
|
3081
3111
|
}
|
|
@@ -4429,16 +4459,17 @@ var $;
|
|
|
4429
4459
|
"use strict";
|
|
4430
4460
|
var $;
|
|
4431
4461
|
(function ($) {
|
|
4432
|
-
|
|
4433
|
-
|
|
4462
|
+
const mask = 0b11111_11111_11111;
|
|
4463
|
+
function $mol_coord_pack(high, low) {
|
|
4464
|
+
return (high << 17 >>> 2) | (low & mask);
|
|
4434
4465
|
}
|
|
4435
4466
|
$.$mol_coord_pack = $mol_coord_pack;
|
|
4436
|
-
function $mol_coord_high(
|
|
4437
|
-
return
|
|
4467
|
+
function $mol_coord_high(pack) {
|
|
4468
|
+
return pack << 2 >> 17;
|
|
4438
4469
|
}
|
|
4439
4470
|
$.$mol_coord_high = $mol_coord_high;
|
|
4440
|
-
function $mol_coord_low(
|
|
4441
|
-
return (
|
|
4471
|
+
function $mol_coord_low(pack) {
|
|
4472
|
+
return (pack << 17) >> 17;
|
|
4442
4473
|
}
|
|
4443
4474
|
$.$mol_coord_low = $mol_coord_low;
|
|
4444
4475
|
})($ || ($ = {}));
|
|
@@ -4524,6 +4555,12 @@ var $;
|
|
|
4524
4555
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4525
4556
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4526
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
|
+
}
|
|
4527
4564
|
}
|
|
4528
4565
|
__decorate([
|
|
4529
4566
|
$mol_mem
|
|
@@ -4531,6 +4568,9 @@ var $;
|
|
|
4531
4568
|
__decorate([
|
|
4532
4569
|
$mol_mem
|
|
4533
4570
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4571
|
+
__decorate([
|
|
4572
|
+
$mol_mem
|
|
4573
|
+
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4534
4574
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4535
4575
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4536
4576
|
})($ || ($ = {}));
|