@maas/vue-equipment 0.25.0 → 0.25.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.24.8"
4
+ "version": "0.25.0"
5
5
  }
@@ -170,7 +170,6 @@ const { onPointerdown, onClick, style, hasDragged } = useDrawerDrag({
170
170
  const { initializeWheelListener, destroyWheelListener } = useDrawerWheel({
171
171
  id: props.id,
172
172
  elRef,
173
- drawerRef,
174
173
  position,
175
174
  })
176
175
 
@@ -3,7 +3,6 @@ import { type DefaultOptions } from '../../utils/defaultOptions.js';
3
3
  type UseDrawerWheelArgs = {
4
4
  id: MaybeRef<string>;
5
5
  elRef: Ref<HTMLElement | undefined>;
6
- drawerRef: Ref<HTMLElement | undefined>;
7
6
  position: MaybeRef<DefaultOptions['position']>;
8
7
  };
9
8
  export declare function useDrawerWheel(args: UseDrawerWheelArgs): {
@@ -3,7 +3,7 @@ import { unrefElement } from "@vueuse/core";
3
3
  import WheelGestures from "wheel-gestures";
4
4
  import { useDrawerState } from "./useDrawerState.mjs";
5
5
  export function useDrawerWheel(args) {
6
- const { id, elRef, drawerRef, position } = args;
6
+ const { id, elRef, position } = args;
7
7
  const { findState } = useDrawerState(toValue(id));
8
8
  const { dragging, wheeling } = findState();
9
9
  let startEvent;
@@ -71,7 +71,7 @@ export function useDrawerWheel(args) {
71
71
  if (primaryAxisDeltaIsDominant && !dragging.value && !state.isMomentum) {
72
72
  onWheelStarted(state);
73
73
  }
74
- if (!dragging.value) {
74
+ if (!dragging.value || !wheeling.value) {
75
75
  return;
76
76
  }
77
77
  if (isEndingOrRelease) {
@@ -81,10 +81,7 @@ export function useDrawerWheel(args) {
81
81
  }
82
82
  }
83
83
  function initializeWheelListener() {
84
- if (!unrefElement(drawerRef)) {
85
- return;
86
- }
87
- unobserveTargetNode = wheelGestures.observe(unrefElement(drawerRef));
84
+ unobserveTargetNode = wheelGestures.observe(document);
88
85
  cancelWheel = wheelGestures.on("wheel", handleWheel);
89
86
  }
90
87
  function destroyWheelListener() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "A magic collection of Vue composables, plugins, components and directives",
4
- "version": "0.25.0",
4
+ "version": "0.25.1",
5
5
  "author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
6
6
  "devDependencies": {
7
7
  "@antfu/ni": "^0.21.12",