added css variables for minimap mask, set default mask-stroke to 0
This commit is contained in:
@@ -51,8 +51,8 @@ function MiniMapComponent({
|
||||
nodeComponent,
|
||||
bgColor,
|
||||
maskColor,
|
||||
maskStrokeColor = 'none',
|
||||
maskStrokeWidth = 1,
|
||||
maskStrokeColor,
|
||||
maskStrokeWidth,
|
||||
position = 'bottom-right',
|
||||
onClick,
|
||||
onNodeClick,
|
||||
@@ -133,6 +133,9 @@ function MiniMapComponent({
|
||||
...style,
|
||||
'--xy-minimap-background-color-props': typeof bgColor === 'string' ? bgColor : undefined,
|
||||
'--xy-minimap-mask-background-color-props': typeof maskColor === 'string' ? maskColor : undefined,
|
||||
'--xy-minimap-mask-stroke-color-props': typeof maskStrokeColor === 'string' ? maskStrokeColor : undefined,
|
||||
'--xy-minimap-mask-stroke-width-props':
|
||||
typeof maskStrokeWidth === 'number' ? maskStrokeWidth * viewScale : undefined,
|
||||
'--xy-minimap-node-background-color-props': typeof nodeColor === 'string' ? nodeColor : undefined,
|
||||
'--xy-minimap-node-stroke-color-props': typeof nodeStrokeColor === 'string' ? nodeStrokeColor : undefined,
|
||||
'--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'string' ? nodeStrokeWidth : undefined,
|
||||
@@ -166,8 +169,6 @@ function MiniMapComponent({
|
||||
d={`M${x - offset},${y - offset}h${width + offset * 2}v${height + offset * 2}h${-width - offset * 2}z
|
||||
M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`}
|
||||
fillRule="evenodd"
|
||||
stroke={maskStrokeColor}
|
||||
strokeWidth={maskStrokeWidth * viewScale}
|
||||
pointerEvents="none"
|
||||
/>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user