bug fix: more post rebase fixes.
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
import type { MouseEvent } from 'react';
|
||||
import cc from 'classcat';
|
||||
|
||||
import { useStore } from '../../hooks/useStore';
|
||||
import { containerStyle } from '../../styles';
|
||||
import type { ReactFlowState } from '../../types';
|
||||
import type { FlowRendererProps } from '.';
|
||||
|
||||
type PaneProps = Pick<FlowRendererProps, 'onClick' | 'onContextMenu' | 'onWheel'> & {
|
||||
onMouseEnter?: (event: MouseEvent) => void;
|
||||
onMouseMove?: (event: MouseEvent) => void;
|
||||
onMouseLeave?: (event: MouseEvent) => void;
|
||||
};
|
||||
|
||||
const selector = (s: ReactFlowState) => s.paneDragging;
|
||||
|
||||
function Pane({ onClick, onMouseEnter, onMouseMove, onMouseLeave, onContextMenu, onWheel }: PaneProps) {
|
||||
const dragging = useStore(selector);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cc(['react-flow__pane', { dragging }])}
|
||||
onClick={onClick}
|
||||
onMouseEnter={onMouseEnter}
|
||||
onMouseMove={onMouseMove}
|
||||
onMouseLeave={onMouseLeave}
|
||||
onContextMenu={onContextMenu}
|
||||
onWheel={onWheel}
|
||||
style={containerStyle}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default Pane;
|
||||
@@ -8,7 +8,6 @@ import { GraphViewProps } from '../GraphView';
|
||||
import ZoomPane from '../ZoomPane';
|
||||
import UserSelection from '../../components/UserSelection';
|
||||
import NodesSelection from '../../components/NodesSelection';
|
||||
import Pane from './Pane';
|
||||
import type { ReactFlowState } from '../../types';
|
||||
|
||||
export type FlowRendererProps = Omit<
|
||||
|
||||
Reference in New Issue
Block a user