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
* TODO: import it as lazy, after it is supported in common
26
28
* 1. If using react select please use menuPlacement='auto'
27
29
* 2. dragSelector will be used to identify the grabbable button that will grab the div to drag
28
-
* 3. parentRef is the reference point from which we will derive the base top:0 ,left: 0 position
30
+
* 3. The wrapper is positioned at the viewport's top-left (top: 0, left: 0) using fixed positioning; parentRef is an optional
31
+
* reference that may be used for position calculations but is not the base origin for the coordinate system.
29
32
*/
30
33
constDraggableWrapper=({
31
34
children,
@@ -74,9 +77,7 @@ const DraggableWrapper = ({
74
77
}
75
78
// Add more cases for other variants if needed
76
79
default: {
77
-
// Since need node to be in center of screen so subtracting width/2 by left of parentRect it will start the node from center but want node's midpoint at center so subtracting node's width from it.
78
80
constx=(windowSize.width-nodeRefWidth)/2
79
-
// subtracting top since windowSize already contains that
0 commit comments