mol_plot_all 1.2.433 → 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/web.test.js +1 -3
- package/web.test.js.map +1 -1
package/web.js
CHANGED
|
@@ -3241,6 +3241,8 @@ var $;
|
|
|
3241
3241
|
let pos = this.pointer_center();
|
|
3242
3242
|
if (!action_type)
|
|
3243
3243
|
return;
|
|
3244
|
+
if (!start_pos)
|
|
3245
|
+
return;
|
|
3244
3246
|
if (action_type === 'draw') {
|
|
3245
3247
|
const distance = new $mol_vector(start_pos, pos).distance();
|
|
3246
3248
|
if (distance >= 4) {
|
|
@@ -3248,8 +3250,6 @@ var $;
|
|
|
3248
3250
|
}
|
|
3249
3251
|
return;
|
|
3250
3252
|
}
|
|
3251
|
-
if (!start_pos)
|
|
3252
|
-
return;
|
|
3253
3253
|
if (action_type === 'pan') {
|
|
3254
3254
|
this.dom_node().setPointerCapture(event.pointerId);
|
|
3255
3255
|
this.pan(new $mol_vector_2d(start_pan[0] + pos[0] - start_pos[0], start_pan[1] + pos[1] - start_pos[1]));
|
|
@@ -3346,7 +3346,7 @@ var $;
|
|
|
3346
3346
|
const action_type = this.event_eat(event);
|
|
3347
3347
|
if (action_type === 'zoom') {
|
|
3348
3348
|
const zoom_prev = this.zoom() || 0.001;
|
|
3349
|
-
const zoom_next = zoom_prev * (1 - .001 * event.deltaY);
|
|
3349
|
+
const zoom_next = zoom_prev * (1 - .001 * Math.min(event.deltaY, 100));
|
|
3350
3350
|
const mult = zoom_next / zoom_prev;
|
|
3351
3351
|
this.zoom(zoom_next);
|
|
3352
3352
|
const pan_prev = this.pan();
|