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.test.js CHANGED
@@ -3478,7 +3478,7 @@ var $;
3478
3478
  const events = this.pointer_events();
3479
3479
  const touches = events.filter(e => e.pointerType === 'touch');
3480
3480
  const pens = events.filter(e => e.pointerType === 'pen');
3481
- const mouses = events.filter(e => e.pointerType === 'mouse');
3481
+ const mouses = events.filter(e => !e.pointerType || e.pointerType === 'mouse');
3482
3482
  const choosen = touches.length ? touches : pens.length ? pens : mouses;
3483
3483
  return new $.$mol_vector(...choosen.map(event => this.event_coords(event)));
3484
3484
  }
@@ -3500,7 +3500,9 @@ var $;
3500
3500
  }
3501
3501
  event_eat(event) {
3502
3502
  if (event instanceof PointerEvent) {
3503
- const events = this.pointer_events().filter(e => e.pointerId !== event.pointerId);
3503
+ const events = this.pointer_events()
3504
+ .filter(e => e instanceof PointerEvent)
3505
+ .filter(e => e.pointerId !== event.pointerId);
3504
3506
  if (event.type !== 'pointerup' && event.type !== 'pointerleave')
3505
3507
  events.push(event);
3506
3508
  this.pointer_events(events);
@@ -3528,6 +3530,7 @@ var $;
3528
3530
  return this.action_type('');
3529
3531
  }
3530
3532
  if (event instanceof WheelEvent) {
3533
+ this.pointer_events([event]);
3531
3534
  if (event.ctrlKey)
3532
3535
  return this.action_type('zoom');
3533
3536
  return this.action_type('pan');