From fd2e131a9c255e4c84a8861a63de87ab25320b69 Mon Sep 17 00:00:00 2001 From: moklick Date: Thu, 7 Mar 2024 13:41:46 +0100 Subject: [PATCH] chore(react): dont use position fixed --- packages/react/src/container/Pane/index.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/react/src/container/Pane/index.tsx b/packages/react/src/container/Pane/index.tsx index 5425f91d..dfb240d0 100644 --- a/packages/react/src/container/Pane/index.tsx +++ b/packages/react/src/container/Pane/index.tsx @@ -2,7 +2,7 @@ * The user selection rectangle gets displayed when a user drags the mouse while pressing shift */ -import { CSSProperties, useRef, type MouseEvent as ReactMouseEvent, type ReactNode } from 'react'; +import { useRef, type MouseEvent as ReactMouseEvent, type ReactNode } from 'react'; import { shallow } from 'zustand/shallow'; import cc from 'classcat'; import { getNodesInside, getEventPosition, SelectionMode } from '@xyflow/system'; @@ -13,11 +13,6 @@ import { useStore, useStoreApi } from '../../hooks/useStore'; import { getSelectionChanges } from '../../utils'; import type { ReactFlowProps, ReactFlowState, NodeChange, EdgeChange } from '../../types'; -export const paneStyle: CSSProperties = { - ...containerStyle, - position: 'fixed', -}; - type PaneProps = { isSelecting: boolean; children: ReactNode; @@ -232,7 +227,7 @@ export function Pane({ onMouseUp={hasActiveSelection ? onMouseUp : undefined} onMouseLeave={hasActiveSelection ? onMouseLeave : onPaneMouseLeave} ref={container} - style={paneStyle} + style={containerStyle} > {children}