mol_plot_all 1.2.135 → 1.2.136

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.js CHANGED
@@ -3486,7 +3486,7 @@ var $;
3486
3486
  const events = this.pointer_events();
3487
3487
  const touches = events.filter(e => e.pointerType === 'touch');
3488
3488
  const pens = events.filter(e => e.pointerType === 'pen');
3489
- const mouses = events.filter(e => e.pointerType === 'mouse');
3489
+ const mouses = events.filter(e => !e.pointerType || e.pointerType === 'mouse');
3490
3490
  const choosen = touches.length ? touches : pens.length ? pens : mouses;
3491
3491
  return new $.$mol_vector(...choosen.map(event => this.event_coords(event)));
3492
3492
  }
@@ -3508,7 +3508,9 @@ var $;
3508
3508
  }
3509
3509
  event_eat(event) {
3510
3510
  if (event instanceof PointerEvent) {
3511
- const events = this.pointer_events().filter(e => e.pointerId !== event.pointerId);
3511
+ const events = this.pointer_events()
3512
+ .filter(e => e instanceof PointerEvent)
3513
+ .filter(e => e.pointerId !== event.pointerId);
3512
3514
  if (event.type !== 'pointerup' && event.type !== 'pointerleave')
3513
3515
  events.push(event);
3514
3516
  this.pointer_events(events);
@@ -3536,6 +3538,7 @@ var $;
3536
3538
  return this.action_type('');
3537
3539
  }
3538
3540
  if (event instanceof WheelEvent) {
3541
+ this.pointer_events([event]);
3539
3542
  if (event.ctrlKey)
3540
3543
  return this.action_type('zoom');
3541
3544
  return this.action_type('pan');