@reactflow/minimap
Advanced tools
Comparing version 11.6.0 to 11.6.1
@@ -9,6 +9,6 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime'; | ||
const MiniMapNode = ({ id, x, y, width, height, style, color, strokeColor, strokeWidth, className, borderRadius, shapeRendering, onClick, selected, }) => { | ||
const MiniMapNode = ({ id, x, y, width, height, style, color, strokeColor, strokeWidth, className, borderRadius, shapeRendering, onClick, }) => { | ||
const { background, backgroundColor } = style || {}; | ||
const fill = (color || background || backgroundColor); | ||
return (jsx("rect", { className: cc(['react-flow__minimap-node', { selected }, className]), x: x, y: y, rx: borderRadius, ry: borderRadius, width: width, height: height, fill: fill, stroke: strokeColor, strokeWidth: strokeWidth, shapeRendering: shapeRendering, onClick: onClick ? (event) => onClick(event, id) : undefined })); | ||
return (jsx("rect", { className: cc(['react-flow__minimap-node', className]), x: x, y: y, rx: borderRadius, ry: borderRadius, width: width, height: height, fill: fill, stroke: strokeColor, strokeWidth: strokeWidth, shapeRendering: shapeRendering, onClick: onClick ? (event) => onClick(event, id) : undefined })); | ||
}; | ||
@@ -33,3 +33,3 @@ MiniMapNode.displayName = 'MiniMapNode'; | ||
const { x, y } = getNodePositionWithOrigin(node, nodeOrigin).positionAbsolute; | ||
return (jsx(NodeComponent, { x: x, y: y, width: node.width, height: node.height, style: node.style, selected: node.selected, className: nodeClassNameFunc(node), color: nodeColorFunc(node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering: shapeRendering, onClick: onClick, id: node.id }, node.id)); | ||
return (jsx(NodeComponent, { x: x, y: y, width: node.width, height: node.height, style: node.style, className: nodeClassNameFunc(node), color: nodeColorFunc(node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering: shapeRendering, onClick: onClick, id: node.id }, node.id)); | ||
}) })); | ||
@@ -59,3 +59,3 @@ } | ||
// a component properly. | ||
nodeComponent, maskColor = 'rgb(240, 240, 240, 0.6)', maskStrokeColor = 'none', maskStrokeWidth = 1, position = 'bottom-right', onClick, onNodeClick, pannable = false, zoomable = false, ariaLabel = 'React Flow mini map', inversePan = false, zoomStep = 10, offsetScale = 5 }) { | ||
nodeComponent, maskColor = 'rgb(240, 240, 240, 0.6)', maskStrokeColor = 'none', maskStrokeWidth = 1, position = 'bottom-right', onClick, onNodeClick, pannable = false, zoomable = false, ariaLabel = 'React Flow mini map', inversePan = false, zoomStep = 10, }) { | ||
const store = useStoreApi(); | ||
@@ -71,3 +71,3 @@ const svg = useRef(null); | ||
const viewHeight = viewScale * elementHeight; | ||
const offset = offsetScale * viewScale; | ||
const offset = 5 * viewScale; | ||
const x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset; | ||
@@ -74,0 +74,0 @@ const y = boundingRect.y - (viewHeight - boundingRect.height) / 2 - offset; |
{ | ||
"name": "@reactflow/minimap", | ||
"version": "11.6.0", | ||
"version": "11.6.1", | ||
"description": "Minimap component for React Flow.", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"zustand": "^4.4.1", | ||
"@reactflow/core": "11.8.0" | ||
"@reactflow/core": "11.8.1" | ||
}, | ||
@@ -59,5 +59,5 @@ "peerDependencies": { | ||
"typescript": "^4.9.4", | ||
"@reactflow/rollup-config": "0.0.0", | ||
"@reactflow/tsconfig": "0.0.0", | ||
"@reactflow/eslint-config": "0.0.0", | ||
"@reactflow/tsconfig": "0.0.0" | ||
"@reactflow/rollup-config": "0.0.0" | ||
}, | ||
@@ -64,0 +64,0 @@ "rollup": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
168797
+ Added@reactflow/core@11.8.1(transitive)
- Removed@reactflow/core@11.8.0(transitive)
Updated@reactflow/core@11.8.1