mol_plot_all 1.2.239 → 1.2.242
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 -6
- package/node.deps.json +1 -1
- package/node.esm.js +37 -32
- package/node.esm.js.map +1 -1
- package/node.js +37 -32
- package/node.js.map +1 -1
- package/node.test.js +39 -59
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +12 -6
- package/web.deps.json +1 -1
- package/web.esm.js +37 -32
- package/web.esm.js.map +1 -1
- package/web.js +37 -32
- package/web.js.map +1 -1
- package/web.test.js +2 -27
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1731,26 +1731,7 @@ var $;
|
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
resync(...args) {
|
|
1734
|
-
|
|
1735
|
-
try {
|
|
1736
|
-
res = this.recall(...args);
|
|
1737
|
-
}
|
|
1738
|
-
catch (error) {
|
|
1739
|
-
if (error instanceof Promise)
|
|
1740
|
-
$mol_fail_hidden(error);
|
|
1741
|
-
res = error;
|
|
1742
|
-
}
|
|
1743
|
-
try {
|
|
1744
|
-
this.once();
|
|
1745
|
-
}
|
|
1746
|
-
catch (error) {
|
|
1747
|
-
if (error instanceof Promise)
|
|
1748
|
-
$mol_fail_hidden(error);
|
|
1749
|
-
}
|
|
1750
|
-
return this.put(res);
|
|
1751
|
-
}
|
|
1752
|
-
recall(...args) {
|
|
1753
|
-
return this.task.call(this.host, ...args);
|
|
1734
|
+
return this.put(this.task.call(this.host, ...args));
|
|
1754
1735
|
}
|
|
1755
1736
|
once() {
|
|
1756
1737
|
return this.sync();
|
|
@@ -1799,9 +1780,6 @@ var $;
|
|
|
1799
1780
|
__decorate([
|
|
1800
1781
|
$mol_wire_method
|
|
1801
1782
|
], $mol_wire_atom.prototype, "resync", null);
|
|
1802
|
-
__decorate([
|
|
1803
|
-
$mol_wire_method
|
|
1804
|
-
], $mol_wire_atom.prototype, "recall", null);
|
|
1805
1783
|
__decorate([
|
|
1806
1784
|
$mol_wire_method
|
|
1807
1785
|
], $mol_wire_atom.prototype, "once", null);
|
|
@@ -2757,8 +2735,11 @@ var $;
|
|
|
2757
2735
|
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2758
2736
|
}
|
|
2759
2737
|
get x() { return this[0]; }
|
|
2738
|
+
set x(next) { this[0] = next; }
|
|
2760
2739
|
get y() { return this[1]; }
|
|
2740
|
+
set y(next) { this[1] = next; }
|
|
2761
2741
|
get z() { return this[2]; }
|
|
2742
|
+
set z(next) { this[2] = next; }
|
|
2762
2743
|
}
|
|
2763
2744
|
$.$mol_vector = $mol_vector;
|
|
2764
2745
|
class $mol_vector_1d extends $mol_vector {
|
|
@@ -2771,10 +2752,17 @@ var $;
|
|
|
2771
2752
|
}
|
|
2772
2753
|
$.$mol_vector_3d = $mol_vector_3d;
|
|
2773
2754
|
class $mol_vector_range extends $mol_vector {
|
|
2774
|
-
|
|
2775
|
-
|
|
2755
|
+
0;
|
|
2756
|
+
1;
|
|
2757
|
+
constructor(min, max) {
|
|
2758
|
+
super(min, max);
|
|
2759
|
+
this[0] = min;
|
|
2760
|
+
this[1] = max;
|
|
2761
|
+
}
|
|
2776
2762
|
get min() { return this[0]; }
|
|
2763
|
+
set min(next) { this[0] = next; }
|
|
2777
2764
|
get max() { return this[1]; }
|
|
2765
|
+
set max(next) { this[1] = next; }
|
|
2778
2766
|
get inversed() {
|
|
2779
2767
|
return new this.constructor(this.max, this.min);
|
|
2780
2768
|
}
|
|
@@ -3080,7 +3068,14 @@ var $;
|
|
|
3080
3068
|
const series_x = this.series_x();
|
|
3081
3069
|
const series_y = this.series_y();
|
|
3082
3070
|
for (let i = 0; i < series_x.length; i++) {
|
|
3083
|
-
|
|
3071
|
+
if (series_x[i] > next.x.max)
|
|
3072
|
+
next.x.max = series_x[i];
|
|
3073
|
+
if (series_x[i] < next.x.min)
|
|
3074
|
+
next.x.min = series_x[i];
|
|
3075
|
+
if (series_y[i] > next.y.max)
|
|
3076
|
+
next.y.max = series_y[i];
|
|
3077
|
+
if (series_y[i] < next.y.min)
|
|
3078
|
+
next.y.min = series_y[i];
|
|
3084
3079
|
}
|
|
3085
3080
|
return next;
|
|
3086
3081
|
}
|
|
@@ -4434,16 +4429,17 @@ var $;
|
|
|
4434
4429
|
"use strict";
|
|
4435
4430
|
var $;
|
|
4436
4431
|
(function ($) {
|
|
4437
|
-
|
|
4438
|
-
|
|
4432
|
+
const mask = 0b11111_11111_11111;
|
|
4433
|
+
function $mol_coord_pack(high, low) {
|
|
4434
|
+
return (high << 17 >>> 2) | (low & mask);
|
|
4439
4435
|
}
|
|
4440
4436
|
$.$mol_coord_pack = $mol_coord_pack;
|
|
4441
|
-
function $mol_coord_high(
|
|
4442
|
-
return
|
|
4437
|
+
function $mol_coord_high(pack) {
|
|
4438
|
+
return pack << 2 >> 17;
|
|
4443
4439
|
}
|
|
4444
4440
|
$.$mol_coord_high = $mol_coord_high;
|
|
4445
|
-
function $mol_coord_low(
|
|
4446
|
-
return (
|
|
4441
|
+
function $mol_coord_low(pack) {
|
|
4442
|
+
return (pack << 17) >> 17;
|
|
4447
4443
|
}
|
|
4448
4444
|
$.$mol_coord_low = $mol_coord_low;
|
|
4449
4445
|
})($ || ($ = {}));
|
|
@@ -4529,6 +4525,12 @@ var $;
|
|
|
4529
4525
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4530
4526
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4531
4527
|
}
|
|
4528
|
+
dimensions() {
|
|
4529
|
+
const scale = this.scale();
|
|
4530
|
+
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4531
|
+
const dims = super.dimensions();
|
|
4532
|
+
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));
|
|
4533
|
+
}
|
|
4532
4534
|
}
|
|
4533
4535
|
__decorate([
|
|
4534
4536
|
$mol_mem
|
|
@@ -4536,6 +4538,9 @@ var $;
|
|
|
4536
4538
|
__decorate([
|
|
4537
4539
|
$mol_mem
|
|
4538
4540
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4541
|
+
__decorate([
|
|
4542
|
+
$mol_mem
|
|
4543
|
+
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4539
4544
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4540
4545
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4541
4546
|
})($ || ($ = {}));
|
|
@@ -6953,33 +6958,6 @@ var $;
|
|
|
6953
6958
|
], App, "test", null);
|
|
6954
6959
|
App.test();
|
|
6955
6960
|
},
|
|
6956
|
-
'Update deps on push'($) {
|
|
6957
|
-
class App extends $mol_object2 {
|
|
6958
|
-
static $ = $;
|
|
6959
|
-
static left(next = false) {
|
|
6960
|
-
return next;
|
|
6961
|
-
}
|
|
6962
|
-
static right(next = false) {
|
|
6963
|
-
return next;
|
|
6964
|
-
}
|
|
6965
|
-
static res(next) {
|
|
6966
|
-
return this.left(next) && this.right();
|
|
6967
|
-
}
|
|
6968
|
-
}
|
|
6969
|
-
__decorate([
|
|
6970
|
-
$mol_wire_mem(0)
|
|
6971
|
-
], App, "left", null);
|
|
6972
|
-
__decorate([
|
|
6973
|
-
$mol_wire_mem(0)
|
|
6974
|
-
], App, "right", null);
|
|
6975
|
-
__decorate([
|
|
6976
|
-
$mol_wire_mem(0)
|
|
6977
|
-
], App, "res", null);
|
|
6978
|
-
$mol_assert_equal(App.res(), false);
|
|
6979
|
-
$mol_assert_equal(App.res(true), false);
|
|
6980
|
-
$mol_assert_equal(App.right(true), true);
|
|
6981
|
-
$mol_assert_equal(App.res(), true);
|
|
6982
|
-
},
|
|
6983
6961
|
'Different order of pull and push'($) {
|
|
6984
6962
|
class App extends $mol_object2 {
|
|
6985
6963
|
static $ = $;
|
|
@@ -6990,6 +6968,8 @@ var $;
|
|
|
6990
6968
|
return this.store(next);
|
|
6991
6969
|
}
|
|
6992
6970
|
static slow(next) {
|
|
6971
|
+
if (next !== undefined)
|
|
6972
|
+
this.slow();
|
|
6993
6973
|
return this.store(next);
|
|
6994
6974
|
}
|
|
6995
6975
|
}
|