feat(minimap): add maskStrokeWidth and maskStrokeColor

This commit is contained in:
moklick
2022-11-15 16:47:15 +01:00
parent a12c3ade33
commit 5897f6de02
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -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>
+2
View File
@@ -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;