Merge pull request #2562 from wbkd/feat/minimap-props
feat(minimap): add maskStrokeWidth and maskStrokeColor
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@reactflow/minimap': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Add maskStrokeColor and maskStrokeWidth props
|
||||||
@@ -48,6 +48,8 @@ function MiniMap({
|
|||||||
nodeBorderRadius = 5,
|
nodeBorderRadius = 5,
|
||||||
nodeStrokeWidth = 2,
|
nodeStrokeWidth = 2,
|
||||||
maskColor = 'rgb(240, 240, 240, 0.6)',
|
maskColor = 'rgb(240, 240, 240, 0.6)',
|
||||||
|
maskStrokeColor = 'none',
|
||||||
|
maskStrokeWidth = 1,
|
||||||
position = 'bottom-right',
|
position = 'bottom-right',
|
||||||
onClick,
|
onClick,
|
||||||
onNodeClick,
|
onNodeClick,
|
||||||
@@ -181,6 +183,8 @@ function MiniMap({
|
|||||||
M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`}
|
M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`}
|
||||||
fill={maskColor}
|
fill={maskColor}
|
||||||
fillRule="evenodd"
|
fillRule="evenodd"
|
||||||
|
stroke={maskStrokeColor}
|
||||||
|
strokeWidth={maskStrokeWidth}
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ export type MiniMapProps<NodeData = any> = Omit<HTMLAttributes<SVGSVGElement>, '
|
|||||||
nodeBorderRadius?: number;
|
nodeBorderRadius?: number;
|
||||||
nodeStrokeWidth?: number;
|
nodeStrokeWidth?: number;
|
||||||
maskColor?: string;
|
maskColor?: string;
|
||||||
|
maskStrokeColor?: string;
|
||||||
|
maskStrokeWidth?: number;
|
||||||
position?: PanelPosition;
|
position?: PanelPosition;
|
||||||
onClick?: (event: MouseEvent, position: XYPosition) => void;
|
onClick?: (event: MouseEvent, position: XYPosition) => void;
|
||||||
onNodeClick?: (event: MouseEvent, node: Node<NodeData>) => void;
|
onNodeClick?: (event: MouseEvent, node: Node<NodeData>) => void;
|
||||||
|
|||||||
Reference in New Issue
Block a user