@maas/vue-equipment 1.0.0-beta.80 → 1.0.0-beta.81
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/dist/nuxt/module.json
CHANGED
|
@@ -41,6 +41,7 @@ export function useTrayDrag(args) {
|
|
|
41
41
|
const emitter = useMagicEmitter();
|
|
42
42
|
const {
|
|
43
43
|
dimension,
|
|
44
|
+
contentExtent,
|
|
44
45
|
maxInset,
|
|
45
46
|
mapSnapPoint,
|
|
46
47
|
mappedSnapPoints,
|
|
@@ -477,10 +478,16 @@ export function useTrayDrag(args) {
|
|
|
477
478
|
duration: payload.duration
|
|
478
479
|
});
|
|
479
480
|
}
|
|
480
|
-
|
|
481
|
+
const pendingInitialSides = /* @__PURE__ */ new Set();
|
|
482
|
+
async function applyInitial(sides) {
|
|
481
483
|
await getSizes();
|
|
482
484
|
const { transition } = state.options.initial;
|
|
483
|
-
for (const side of draggableSides.value) {
|
|
485
|
+
for (const side of sides ?? draggableSides.value) {
|
|
486
|
+
pendingInitialSides.delete(side);
|
|
487
|
+
if (!contentExtent(side)) {
|
|
488
|
+
pendingInitialSides.add(side);
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
484
491
|
const initial = state.options.initial.snapPoints?.[side] ?? openSnapPoint(side);
|
|
485
492
|
if (initial === void 0) {
|
|
486
493
|
continue;
|
|
@@ -544,6 +551,9 @@ export function useTrayDrag(args) {
|
|
|
544
551
|
resizeObserverEl = useResizeObserver(elRef, () => {
|
|
545
552
|
useThrottleFn(async () => {
|
|
546
553
|
await getSizes();
|
|
554
|
+
if (pendingInitialSides.size) {
|
|
555
|
+
await applyInitial([...pendingInitialSides]);
|
|
556
|
+
}
|
|
547
557
|
for (const side of draggableSides.value) {
|
|
548
558
|
const active = state.activeSnapPoint[side];
|
|
549
559
|
if (active !== void 0) {
|