You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/vaul-svelte/src/lib/vaul.svelte.ts
+39-8
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,27 @@ class DrawerRootState {
99
99
positionFixedState: PositionFixed;
100
100
snapPointState: SnapPoints;
101
101
102
+
resetDrawerRootState=()=>{
103
+
this.hasBeenOpened=false;
104
+
this.visible=false;
105
+
this.justReleased=false;
106
+
this.isDragging=false;
107
+
this.triggerNode=null;
108
+
this.overlayNode=null;
109
+
this.openTime=null;
110
+
this.dragStartTime=null;
111
+
this.dragEndTime=null;
112
+
this.lastTimeDragPrevented=null;
113
+
this.isAllowedToDrag=false;
114
+
this.nestedOpenChangeTimer=null;
115
+
this.pointerStart=0;
116
+
this.keyboardIsOpen=false;
117
+
this.previousDiffFromInitial=0;
118
+
this.drawerNode=null;
119
+
this.drawerHeight=0;
120
+
this.initialDrawerHeight=0;
121
+
};
122
+
102
123
constructor(props: DrawerRootStateProps){
103
124
this.open=props.open;
104
125
this.closeThreshold=props.closeThreshold;
@@ -252,7 +273,6 @@ class DrawerRootState {
252
273
});
253
274
254
275
// Find all scrollable elements inside our drawer and assign a class to it so that we can disable overflow when dragging to prevent pointermove not being captured
0 commit comments