Merge branch 'main' into feat/zindexmode
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
# @xyflow/svelte
|
||||
|
||||
## 1.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#5603](https://github.com/xyflow/xyflow/pull/5603) [`17a175791`](https://github.com/xyflow/xyflow/commit/17a175791b2420b32d55a8fcbbb35649862b85cf) Thanks [@peterkogo](https://github.com/peterkogo)! - Fix onPaneClick always firing when moving the viewport
|
||||
|
||||
- [#5615](https://github.com/xyflow/xyflow/pull/5615) [`8b35c77eb`](https://github.com/xyflow/xyflow/commit/8b35c77ebe5a4f6cba33c597d94eba1ead64fdfc) Thanks [@peterkogo](https://github.com/peterkogo)! - Fix wrong positions when resizing nodes with a non-default node-origin
|
||||
|
||||
- [#5578](https://github.com/xyflow/xyflow/pull/5578) [`00bcb9f5f`](https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773) Thanks [@peterkogo](https://github.com/peterkogo)! - Pass current pointer position to connection
|
||||
|
||||
- Updated dependencies [[`00bcb9f5f`](https://github.com/xyflow/xyflow/commit/00bcb9f5f45f49814b9ac19b3f55cfe069ee3773)]:
|
||||
- @xyflow/system@0.0.73
|
||||
|
||||
## 1.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@xyflow/svelte",
|
||||
"version": "1.4.1",
|
||||
"version": "1.4.2",
|
||||
"description": "Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.",
|
||||
"keywords": [
|
||||
"svelte",
|
||||
|
||||
@@ -15,7 +15,9 @@ import {
|
||||
updateAbsolutePositions,
|
||||
snapPosition,
|
||||
calculateNodePosition,
|
||||
type SetCenterOptions
|
||||
type SetCenterOptions,
|
||||
getHandlePosition,
|
||||
Position
|
||||
} from '@xyflow/system';
|
||||
|
||||
import type { EdgeTypes, NodeTypes, Node, Edge, FitViewOptions } from '$lib/types';
|
||||
@@ -51,6 +53,15 @@ export function createStore<NodeType extends Node = Node, EdgeType extends Edge
|
||||
|
||||
const updateNodePositions: UpdateNodePositions = (nodeDragItems, dragging = false) => {
|
||||
store.nodes = store.nodes.map((node) => {
|
||||
if (store.connection.inProgress && store.connection.fromNode.id === node.id) {
|
||||
const internalNode = store.nodeLookup.get(node.id);
|
||||
if (internalNode) {
|
||||
store.connection = {
|
||||
...store.connection,
|
||||
from: getHandlePosition(internalNode, store.connection.fromHandle, Position.Left, true)
|
||||
};
|
||||
}
|
||||
}
|
||||
const dragItem = nodeDragItems.get(node.id);
|
||||
return dragItem ? { ...node, position: dragItem.position, dragging } : node;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user