mol_plot_all 1.2.434 → 1.2.435
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 -5
- package/node.esm.js +3 -3
- package/node.esm.js.map +1 -1
- package/node.js +3 -3
- package/node.js.map +1 -1
- package/node.test.js +3 -3
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +5 -5
- package/web.esm.js +3 -3
- package/web.esm.js.map +1 -1
- package/web.js +3 -3
- package/web.js.map +1 -1
package/node.d.ts
CHANGED
|
@@ -58,11 +58,11 @@ declare namespace $ {
|
|
|
58
58
|
get $(): $;
|
|
59
59
|
set $(next: $);
|
|
60
60
|
static create<Instance>(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable<Instance>) => void): Instance;
|
|
61
|
-
static [Symbol.toPrimitive]():
|
|
62
|
-
static toString():
|
|
61
|
+
static [Symbol.toPrimitive](): string;
|
|
62
|
+
static toString(): string;
|
|
63
63
|
destructor(): void;
|
|
64
|
-
toString():
|
|
65
|
-
toJSON():
|
|
64
|
+
toString(): string;
|
|
65
|
+
toJSON(): string;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -655,7 +655,7 @@ declare namespace $ {
|
|
|
655
655
|
top: number;
|
|
656
656
|
bottom: number;
|
|
657
657
|
} | null;
|
|
658
|
-
dom_id():
|
|
658
|
+
dom_id(): string;
|
|
659
659
|
dom_node(next?: Element): Element;
|
|
660
660
|
dom_final(): Element | undefined;
|
|
661
661
|
dom_tree(next?: Element): Element;
|
package/node.esm.js
CHANGED
|
@@ -3691,6 +3691,8 @@ var $;
|
|
|
3691
3691
|
let pos = this.pointer_center();
|
|
3692
3692
|
if (!action_type)
|
|
3693
3693
|
return;
|
|
3694
|
+
if (!start_pos)
|
|
3695
|
+
return;
|
|
3694
3696
|
if (action_type === 'draw') {
|
|
3695
3697
|
const distance = new $mol_vector(start_pos, pos).distance();
|
|
3696
3698
|
if (distance >= 4) {
|
|
@@ -3698,8 +3700,6 @@ var $;
|
|
|
3698
3700
|
}
|
|
3699
3701
|
return;
|
|
3700
3702
|
}
|
|
3701
|
-
if (!start_pos)
|
|
3702
|
-
return;
|
|
3703
3703
|
if (action_type === 'pan') {
|
|
3704
3704
|
this.dom_node().setPointerCapture(event.pointerId);
|
|
3705
3705
|
this.pan(new $mol_vector_2d(start_pan[0] + pos[0] - start_pos[0], start_pan[1] + pos[1] - start_pos[1]));
|
|
@@ -3796,7 +3796,7 @@ var $;
|
|
|
3796
3796
|
const action_type = this.event_eat(event);
|
|
3797
3797
|
if (action_type === 'zoom') {
|
|
3798
3798
|
const zoom_prev = this.zoom() || 0.001;
|
|
3799
|
-
const zoom_next = zoom_prev * (1 - .001 * event.deltaY);
|
|
3799
|
+
const zoom_next = zoom_prev * (1 - .001 * Math.min(event.deltaY, 100));
|
|
3800
3800
|
const mult = zoom_next / zoom_prev;
|
|
3801
3801
|
this.zoom(zoom_next);
|
|
3802
3802
|
const pan_prev = this.pan();
|