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,
|
||||
nodeStrokeWidth = 2,
|
||||
maskColor = 'rgb(240, 240, 240, 0.6)',
|
||||
maskStrokeColor = 'none',
|
||||
maskStrokeWidth = 1,
|
||||
position = 'bottom-right',
|
||||
onClick,
|
||||
onNodeClick,
|
||||
@@ -181,6 +183,8 @@ function MiniMap({
|
||||
M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`}
|
||||
fill={maskColor}
|
||||
fillRule="evenodd"
|
||||
stroke={maskStrokeColor}
|
||||
strokeWidth={maskStrokeWidth}
|
||||
/>
|
||||
</svg>
|
||||
</Panel>
|
||||
|
||||
@@ -11,6 +11,8 @@ export type MiniMapProps<NodeData = any> = Omit<HTMLAttributes<SVGSVGElement>, '
|
||||
nodeBorderRadius?: number;
|
||||
nodeStrokeWidth?: number;
|
||||
maskColor?: string;
|
||||
maskStrokeColor?: string;
|
||||
maskStrokeWidth?: number;
|
||||
position?: PanelPosition;
|
||||
onClick?: (event: MouseEvent, position: XYPosition) => void;
|
||||
onNodeClick?: (event: MouseEvent, node: Node<NodeData>) => void;
|
||||
|
||||
Reference in New Issue
Block a user