mol_plot_all 1.2.238 → 1.2.241
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 +14 -6
- 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 +14 -6
- package/web.deps.json +1 -1
- package/web.esm.js +60 -20
- package/web.esm.js.map +1 -1
- package/web.js +60 -20
- package/web.js.map +1 -1
- package/web.test.js +40 -0
- package/web.test.js.map +1 -1
package/web.js
CHANGED
|
@@ -1257,17 +1257,27 @@ var $;
|
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1260
|
+
resync(...args) {
|
|
1261
|
+
let res;
|
|
1262
|
+
try {
|
|
1263
|
+
res = this.recall(...args);
|
|
1264
|
+
}
|
|
1265
|
+
catch (error) {
|
|
1266
|
+
if (error instanceof Promise)
|
|
1267
|
+
$mol_fail_hidden(error);
|
|
1268
|
+
res = error;
|
|
1269
|
+
}
|
|
1270
|
+
try {
|
|
1271
|
+
this.once();
|
|
1272
|
+
}
|
|
1273
|
+
catch (error) {
|
|
1274
|
+
if (error instanceof Promise)
|
|
1275
|
+
$mol_fail_hidden(error);
|
|
1269
1276
|
}
|
|
1270
|
-
return this.put(
|
|
1277
|
+
return this.put(res);
|
|
1278
|
+
}
|
|
1279
|
+
recall(...args) {
|
|
1280
|
+
return this.task.call(this.host, ...args);
|
|
1271
1281
|
}
|
|
1272
1282
|
once() {
|
|
1273
1283
|
return this.sync();
|
|
@@ -1313,6 +1323,9 @@ var $;
|
|
|
1313
1323
|
return next;
|
|
1314
1324
|
}
|
|
1315
1325
|
}
|
|
1326
|
+
__decorate([
|
|
1327
|
+
$mol_wire_method
|
|
1328
|
+
], $mol_wire_atom.prototype, "resync", null);
|
|
1316
1329
|
__decorate([
|
|
1317
1330
|
$mol_wire_method
|
|
1318
1331
|
], $mol_wire_atom.prototype, "recall", null);
|
|
@@ -1360,7 +1373,7 @@ var $;
|
|
|
1360
1373
|
return atom.sync();
|
|
1361
1374
|
}
|
|
1362
1375
|
}
|
|
1363
|
-
return atom.
|
|
1376
|
+
return atom.resync(...args);
|
|
1364
1377
|
};
|
|
1365
1378
|
Object.defineProperty(wrapper, 'name', { value: func.name + ' ' });
|
|
1366
1379
|
Object.assign(wrapper, { orig: func });
|
|
@@ -2362,8 +2375,11 @@ var $;
|
|
|
2362
2375
|
return this[0].map((_, i) => this.map(row => row[i]));
|
|
2363
2376
|
}
|
|
2364
2377
|
get x() { return this[0]; }
|
|
2378
|
+
set x(next) { this[0] = next; }
|
|
2365
2379
|
get y() { return this[1]; }
|
|
2380
|
+
set y(next) { this[1] = next; }
|
|
2366
2381
|
get z() { return this[2]; }
|
|
2382
|
+
set z(next) { this[2] = next; }
|
|
2367
2383
|
}
|
|
2368
2384
|
$.$mol_vector = $mol_vector;
|
|
2369
2385
|
class $mol_vector_1d extends $mol_vector {
|
|
@@ -2376,10 +2392,17 @@ var $;
|
|
|
2376
2392
|
}
|
|
2377
2393
|
$.$mol_vector_3d = $mol_vector_3d;
|
|
2378
2394
|
class $mol_vector_range extends $mol_vector {
|
|
2379
|
-
|
|
2380
|
-
|
|
2395
|
+
0;
|
|
2396
|
+
1;
|
|
2397
|
+
constructor(min, max) {
|
|
2398
|
+
super(min, max);
|
|
2399
|
+
this[0] = min;
|
|
2400
|
+
this[1] = max;
|
|
2401
|
+
}
|
|
2381
2402
|
get min() { return this[0]; }
|
|
2403
|
+
set min(next) { this[0] = next; }
|
|
2382
2404
|
get max() { return this[1]; }
|
|
2405
|
+
set max(next) { this[1] = next; }
|
|
2383
2406
|
get inversed() {
|
|
2384
2407
|
return new this.constructor(this.max, this.min);
|
|
2385
2408
|
}
|
|
@@ -2685,7 +2708,14 @@ var $;
|
|
|
2685
2708
|
const series_x = this.series_x();
|
|
2686
2709
|
const series_y = this.series_y();
|
|
2687
2710
|
for (let i = 0; i < series_x.length; i++) {
|
|
2688
|
-
|
|
2711
|
+
if (series_x[i] > next.x.max)
|
|
2712
|
+
next.x.max = series_x[i];
|
|
2713
|
+
if (series_x[i] < next.x.min)
|
|
2714
|
+
next.x.min = series_x[i];
|
|
2715
|
+
if (series_y[i] > next.y.max)
|
|
2716
|
+
next.y.max = series_y[i];
|
|
2717
|
+
if (series_y[i] < next.y.min)
|
|
2718
|
+
next.y.min = series_y[i];
|
|
2689
2719
|
}
|
|
2690
2720
|
return next;
|
|
2691
2721
|
}
|
|
@@ -4039,16 +4069,17 @@ var $;
|
|
|
4039
4069
|
"use strict";
|
|
4040
4070
|
var $;
|
|
4041
4071
|
(function ($) {
|
|
4042
|
-
|
|
4043
|
-
|
|
4072
|
+
const mask = 0b11111_11111_11111;
|
|
4073
|
+
function $mol_coord_pack(high, low) {
|
|
4074
|
+
return (high << 17 >>> 2) | (low & mask);
|
|
4044
4075
|
}
|
|
4045
4076
|
$.$mol_coord_pack = $mol_coord_pack;
|
|
4046
|
-
function $mol_coord_high(
|
|
4047
|
-
return
|
|
4077
|
+
function $mol_coord_high(pack) {
|
|
4078
|
+
return pack << 2 >> 17;
|
|
4048
4079
|
}
|
|
4049
4080
|
$.$mol_coord_high = $mol_coord_high;
|
|
4050
|
-
function $mol_coord_low(
|
|
4051
|
-
return (
|
|
4081
|
+
function $mol_coord_low(pack) {
|
|
4082
|
+
return (pack << 17) >> 17;
|
|
4052
4083
|
}
|
|
4053
4084
|
$.$mol_coord_low = $mol_coord_low;
|
|
4054
4085
|
})($ || ($ = {}));
|
|
@@ -4134,6 +4165,12 @@ var $;
|
|
|
4134
4165
|
const size_x = Math.max(0, Math.ceil((1 / aspect - 1) * diameter));
|
|
4135
4166
|
return points.map(point => `M ${point[0] - shift_x} ${point[1] - shift_y} l ${size_x} ${size_y}`).join(' ');
|
|
4136
4167
|
}
|
|
4168
|
+
dimensions() {
|
|
4169
|
+
const scale = this.scale();
|
|
4170
|
+
const radius = this.diameter() / Math.min(...scale) / 2;
|
|
4171
|
+
const dims = super.dimensions();
|
|
4172
|
+
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));
|
|
4173
|
+
}
|
|
4137
4174
|
}
|
|
4138
4175
|
__decorate([
|
|
4139
4176
|
$mol_mem
|
|
@@ -4141,6 +4178,9 @@ var $;
|
|
|
4141
4178
|
__decorate([
|
|
4142
4179
|
$mol_mem
|
|
4143
4180
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4181
|
+
__decorate([
|
|
4182
|
+
$mol_mem
|
|
4183
|
+
], $mol_plot_dot.prototype, "dimensions", null);
|
|
4144
4184
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4145
4185
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4146
4186
|
})($ || ($ = {}));
|