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/web.js CHANGED
@@ -3193,7 +3193,7 @@ var $;
3193
3193
  const events = this.pointer_events();
3194
3194
  const touches = events.filter(e => e.pointerType === 'touch');
3195
3195
  const pens = events.filter(e => e.pointerType === 'pen');
3196
- const mouses = events.filter(e => e.pointerType === 'mouse');
3196
+ const mouses = events.filter(e => !e.pointerType || e.pointerType === 'mouse');
3197
3197
  const choosen = touches.length ? touches : pens.length ? pens : mouses;
3198
3198
  return new $.$mol_vector(...choosen.map(event => this.event_coords(event)));
3199
3199
  }
@@ -3215,7 +3215,9 @@ var $;
3215
3215
  }
3216
3216
  event_eat(event) {
3217
3217
  if (event instanceof PointerEvent) {
3218
- const events = this.pointer_events().filter(e => e.pointerId !== event.pointerId);
3218
+ const events = this.pointer_events()
3219
+ .filter(e => e instanceof PointerEvent)
3220
+ .filter(e => e.pointerId !== event.pointerId);
3219
3221
  if (event.type !== 'pointerup' && event.type !== 'pointerleave')
3220
3222
  events.push(event);
3221
3223
  this.pointer_events(events);
@@ -3243,6 +3245,7 @@ var $;
3243
3245
  return this.action_type('');
3244
3246
  }
3245
3247
  if (event instanceof WheelEvent) {
3248
+ this.pointer_events([event]);
3246
3249
  if (event.ctrlKey)
3247
3250
  return this.action_type('zoom');
3248
3251
  return this.action_type('pan');