Closed mend-for-github-com[bot] closed 7 months ago
This PR contains the following updates:
11.9.2
11.10.3
By merging this PR, the issue #75 will be automatically resolved and closed:
This PR contains the following updates:
11.9.2
->11.10.3
By merging this PR, the issue #75 will be automatically resolved and closed:
Release Notes
xyflow/xyflow (reactflow)
### [`v11.10.3`](https://togithub.com/xyflow/xyflow/compare/reactflow@11.10.2...reactflow@11.10.3) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.10.2...reactflow@11.10.3) ### [`v11.10.2`](https://togithub.com/xyflow/xyflow/compare/reactflow@11.10.1...reactflow@11.10.2) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.10.1...reactflow@11.10.2) ### [`v11.10.1`](https://togithub.com/xyflow/xyflow/releases/tag/11.10.1) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.10.0...reactflow@11.10.1) ##### Patch Changes Just a tiny fix for Typescript users who want to use the new `screenToFlowPosition` and `flowToScreenPosition` function of `useReactFlow`. - [#3605](https://togithub.com/xyflow/xyflow/pull/3605) [`e71dec26`](https://togithub.com/xyflow/xyflow/commit/e71dec263c8a8296d0a890c2fc7d0a5aac94f9e5) - fix(react-flow-instance): add screenToFlow and flowToScreen types - Updated dependencies \[[`e71dec26`](https://togithub.com/xyflow/xyflow/commit/e71dec263c8a8296d0a890c2fc7d0a5aac94f9e5)]: - [@reactflow/core](https://togithub.com/reactflow/core)[@11](https://togithub.com/11).10.1 - [@reactflow/background](https://togithub.com/reactflow/background)[@11](https://togithub.com/11).3.6 - [@reactflow/controls](https://togithub.com/reactflow/controls)[@11](https://togithub.com/11).2.6 - [@reactflow/minimap](https://togithub.com/reactflow/minimap)[@11](https://togithub.com/11).7.6 - [@reactflow/node-resizer](https://togithub.com/reactflow/node-resizer)[@2](https://togithub.com/2).2.6 - [@reactflow/node-toolbar](https://togithub.com/reactflow/node-toolbar)[@1](https://togithub.com/1).3.6 ### [`v11.10.0`](https://togithub.com/xyflow/xyflow/releases/tag/11.10.0) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.9.4...reactflow@11.10.0) #### Upcoming v12 We want to make the migration for v12 as smooth as possible. That's why we added deprecation warnings for the following util functions: ##### Deprecations / Renamings ##### Rename `useReactFlow.project` to `useReactFlow.screenToFlowPosition` ⚠️ **changes**: no need to subtract react flow bounds anymore! before: ```js const reactFlowBounds = reactFlowWrapper.current.getBoundingClientRect(); const position = reactFlowInstance.project({ x: event.clientX - reactFlowBounds.left, y: event.clientY - reactFlowBounds.top, }); ``` after: ```js const position = reactFlowInstance.screenToFlowPosition({ x: event.clientX, y: event.clientY, }); ``` ##### Rename `getTransformForBounds` to `getViewportForBounds` ⚠️ **changes**: returns `{ x: number, y: number, zoom: number }` instead of `[number, number, number]`. before: ```js const [x, y, zoom] = getTransformForBounds(bounds, width, height, 0.5, 2) ``` after: ```js const {x, y, zoom} = getViewportForBounds(bounds, width, height, 0.5, 2) ``` ##### Rename `getRectOfNodes` to `getNodesBounds` no changes, just a renaming. ##### New features - added `useReactFlow.flowToScreenPosition` ##### Minor Changes - [#3597](https://togithub.com/xyflow/xyflow/pull/3597) [`a114c75b`](https://togithub.com/xyflow/xyflow/commit/a114c75b79d1d7bd24937318119a824879fe0b54) Thanks - chore(utils): add renamed functions and deprecations, add `useReactFlow.flowToScreenPosition` ##### Patch Changes - [#3586](https://togithub.com/xyflow/xyflow/pull/3586) [`746fa4a0`](https://togithub.com/xyflow/xyflow/commit/746fa4a0739719402bdc32bcbf18b577bb75cb1b) Thanks [@Nick-Lucas](https://togithub.com/Nick-Lucas)! - fix(intersection-helpers): use nodeRect instead of nodeOrRect - [#3584](https://togithub.com/xyflow/xyflow/pull/3584) [`291db12f`](https://togithub.com/xyflow/xyflow/commit/291db12fb1b7e72765fbf8a724f3853b1ff682fe) - fix(panOnScroll): respect zoomActivationKeyPressed when hovering a node - [#3593](https://togithub.com/xyflow/xyflow/pull/3593) [`e1d3d594`](https://togithub.com/xyflow/xyflow/commit/e1d3d59479cef7e55c4759fd05c7b1d5eb58d070) Thanks [@juspy](https://togithub.com/juspy)! - fix(useOnSelectionChange): multiple handlers - [#3595](https://togithub.com/xyflow/xyflow/pull/3595) [`ddc40528`](https://togithub.com/xyflow/xyflow/commit/ddc40528dd90d3de677f773b6670dc57a2c8520b) Thanks [@bcakmakoglu](https://togithub.com/bcakmakoglu)! - refactor(pan-activation): allow panning by scroll when pan activation key is pressed - [#3596](https://togithub.com/xyflow/xyflow/pull/3596) [`e4c25caf`](https://togithub.com/xyflow/xyflow/commit/e4c25caf7b699c1a50c3c8a9ffee59e00f0804cc) - refactor(handles): snap to handle center when above handle - Updated dependencies \[[`a114c75b`](https://togithub.com/xyflow/xyflow/commit/a114c75b79d1d7bd24937318119a824879fe0b54), [`746fa4a0`](https://togithub.com/xyflow/xyflow/commit/746fa4a0739719402bdc32bcbf18b577bb75cb1b), [`291db12f`](https://togithub.com/xyflow/xyflow/commit/291db12fb1b7e72765fbf8a724f3853b1ff682fe), [`e1d3d594`](https://togithub.com/xyflow/xyflow/commit/e1d3d59479cef7e55c4759fd05c7b1d5eb58d070), [`ddc40528`](https://togithub.com/xyflow/xyflow/commit/ddc40528dd90d3de677f773b6670dc57a2c8520b), [`e4c25caf`](https://togithub.com/xyflow/xyflow/commit/e4c25caf7b699c1a50c3c8a9ffee59e00f0804cc)]: - [@reactflow/core](https://togithub.com/reactflow/core)[@11](https://togithub.com/11).10.0 - [@reactflow/background](https://togithub.com/reactflow/background)[@11](https://togithub.com/11).3.5 - [@reactflow/controls](https://togithub.com/reactflow/controls)[@11](https://togithub.com/11).2.5 - [@reactflow/minimap](https://togithub.com/reactflow/minimap)[@11](https://togithub.com/11).7.5 - [@reactflow/node-resizer](https://togithub.com/reactflow/node-resizer)[@2](https://togithub.com/2).2.5 - [@reactflow/node-toolbar](https://togithub.com/reactflow/node-toolbar)[@1](https://togithub.com/1).3.5 ### [`v11.9.4`](https://togithub.com/xyflow/xyflow/releases/tag/11.9.4) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.9.3...reactflow@11.9.4) ##### Patch Changes - fix(panOnScroll): use correct filter so that connections work - Updated dependencies \[[`e0cef7f1`](https://togithub.com/wbkd/react-flow/commit/e0cef7f1403f489f079ba7acc5b5a9aa596c39e9)]: - [@reactflow/core](https://togithub.com/reactflow/core)[@11](https://togithub.com/11).9.4 - [@reactflow/background](https://togithub.com/reactflow/background)[@11](https://togithub.com/11).3.4 - [@reactflow/controls](https://togithub.com/reactflow/controls)[@11](https://togithub.com/11).2.4 - [@reactflow/minimap](https://togithub.com/reactflow/minimap)[@11](https://togithub.com/11).7.4 - [@reactflow/node-resizer](https://togithub.com/reactflow/node-resizer)[@2](https://togithub.com/2).2.4 - [@reactflow/node-toolbar](https://togithub.com/reactflow/node-toolbar)[@1](https://togithub.com/1).3.4 ### [`v11.9.3`](https://togithub.com/xyflow/xyflow/releases/tag/11.9.3) [Compare Source](https://togithub.com/xyflow/xyflow/compare/reactflow@11.9.2...reactflow@11.9.3) ##### Patch Changes - [#3490](https://togithub.com/wbkd/react-flow/pull/3490) [`530ccc08`](https://togithub.com/wbkd/react-flow/commit/530ccc08b61a14b6e5913623ee732a768eafdc31) - fix(selection): select nodes on click when nodeDragThreshold > 0