We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d549fcd commit 23f6034Copy full SHA for 23f6034
src/components/src/map/map-legend-panel.tsx
@@ -24,6 +24,7 @@ import {withState} from '../injector';
24
import MapControlPanelFactory from './map-control-panel';
25
import MapControlTooltipFactory from './map-control-tooltip';
26
import MapLegendFactory from './map-legend';
27
+import {restrictToWindowEdges} from '@dnd-kit/modifiers';
28
29
const DRAG_RESIZE_ID = 'map-legend-resize';
30
const DRAG_MOVE_ID = 'map-legend-move';
@@ -203,6 +204,7 @@ const DraggableLegend = withState(
203
204
onDragStart={handleDragStart}
205
onDragMove={handleDragMove}
206
onDragEnd={handleDragEnd}
207
+ modifiers={[restrictToWindowEdges]}
208
>
209
<DraggableLegendContent
210
ref={legendContentRef}
0 commit comments