mol_plot_all 1.2.143 → 1.2.147
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 -1
- package/node.deps.json +1 -1
- package/node.esm.js +44 -10
- package/node.esm.js.map +1 -1
- package/node.js +44 -10
- package/node.js.map +1 -1
- package/node.test.js +99 -10
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +5 -1
- package/web.deps.json +1 -1
- package/web.esm.js +44 -10
- package/web.esm.js.map +1 -1
- package/web.js +44 -10
- package/web.js.map +1 -1
- package/web.test.js +55 -0
- package/web.test.js.map +1 -1
package/web.js
CHANGED
|
@@ -1556,16 +1556,50 @@ var $;
|
|
|
1556
1556
|
"use strict";
|
|
1557
1557
|
var $;
|
|
1558
1558
|
(function ($) {
|
|
1559
|
+
function $mol_guid(length = 8, exists = () => false) {
|
|
1560
|
+
for (;;) {
|
|
1561
|
+
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
1562
|
+
if (exists(id))
|
|
1563
|
+
continue;
|
|
1564
|
+
return id;
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
$.$mol_guid = $mol_guid;
|
|
1568
|
+
})($ || ($ = {}));
|
|
1569
|
+
//guid.js.map
|
|
1570
|
+
;
|
|
1571
|
+
"use strict";
|
|
1572
|
+
var $;
|
|
1573
|
+
(function ($) {
|
|
1574
|
+
const keys = new WeakMap();
|
|
1559
1575
|
function $mol_key(value) {
|
|
1560
1576
|
if (!value)
|
|
1561
1577
|
return JSON.stringify(value);
|
|
1562
1578
|
if (typeof value !== 'object' && typeof value !== 'function')
|
|
1563
1579
|
return JSON.stringify(value);
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1580
|
+
return JSON.stringify(value, (field, value) => {
|
|
1581
|
+
if (!value)
|
|
1582
|
+
return value;
|
|
1583
|
+
if (typeof value !== 'object' && typeof value !== 'function')
|
|
1584
|
+
return value;
|
|
1585
|
+
if (Array.isArray(value))
|
|
1586
|
+
return value;
|
|
1587
|
+
const proto = Reflect.getPrototypeOf(value);
|
|
1588
|
+
if (!proto)
|
|
1589
|
+
return value;
|
|
1590
|
+
if (Reflect.getPrototypeOf(proto) === null)
|
|
1591
|
+
return value;
|
|
1592
|
+
if ('toJSON' in value)
|
|
1593
|
+
return value;
|
|
1594
|
+
if (value instanceof RegExp)
|
|
1595
|
+
return value.toString();
|
|
1596
|
+
let key = keys.get(value);
|
|
1597
|
+
if (key)
|
|
1598
|
+
return key;
|
|
1599
|
+
key = $.$mol_guid();
|
|
1600
|
+
keys.set(value, key);
|
|
1601
|
+
return key;
|
|
1602
|
+
});
|
|
1569
1603
|
}
|
|
1570
1604
|
$.$mol_key = $mol_key;
|
|
1571
1605
|
})($ || ($ = {}));
|
|
@@ -3246,9 +3280,9 @@ var $;
|
|
|
3246
3280
|
}
|
|
3247
3281
|
if (event instanceof WheelEvent) {
|
|
3248
3282
|
this.pointer_events([event]);
|
|
3249
|
-
if (event.
|
|
3250
|
-
return this.action_type('
|
|
3251
|
-
return this.action_type('
|
|
3283
|
+
if (event.shiftKey)
|
|
3284
|
+
return this.action_type('pan');
|
|
3285
|
+
return this.action_type('zoom');
|
|
3252
3286
|
}
|
|
3253
3287
|
return this.action_type('');
|
|
3254
3288
|
}
|
|
@@ -3393,7 +3427,7 @@ var $;
|
|
|
3393
3427
|
}
|
|
3394
3428
|
if (action_type === 'pan') {
|
|
3395
3429
|
const pan_prev = this.pan();
|
|
3396
|
-
const pan_next = new $.$mol_vector_2d(pan_prev.x -
|
|
3430
|
+
const pan_next = new $.$mol_vector_2d(pan_prev.x - event.deltaX, pan_prev.y - event.deltaY);
|
|
3397
3431
|
this.pan(pan_next);
|
|
3398
3432
|
}
|
|
3399
3433
|
}
|
|
@@ -4427,7 +4461,7 @@ var $;
|
|
|
4427
4461
|
$.$mol_mem_key
|
|
4428
4462
|
], $mol_plot_map_heat.prototype, "level_points", null);
|
|
4429
4463
|
__decorate([
|
|
4430
|
-
$.$
|
|
4464
|
+
$.$mol_mem_key
|
|
4431
4465
|
], $mol_plot_map_heat.prototype, "level_opacity", null);
|
|
4432
4466
|
__decorate([
|
|
4433
4467
|
$.$mol_mem
|