Commit Graph

325 Commits

Author SHA1 Message Date
moklick
14667f83d2 Merge branch 'enhance-connection-more' of github.com:xyflow/xyflow into enhance-connection-more 2024-06-27 17:15:36 +02:00
moklick
5c44dd9c31 Merge branch 'next' into enhance-connection-more 2024-06-27 17:14:17 +02:00
moklick
b00eff979a Merge branch 'next' into absolute-origin 2024-06-27 17:03:58 +02:00
moklick
aa0e131162 refactor(react): init store with user nodeOrigin 2024-06-27 17:01:01 +02:00
moklick
609f7ed792 refactor(positions): remove unused node origins 2024-06-27 15:03:35 +02:00
peterkogo
941898b97d fixed connectionLine not updating correctly on auto pan 2024-06-27 13:44:30 +02:00
moklick
6cc6960895 refactor(xyhandle): use center for to-xy, block updates only if valid 2024-06-27 12:33:54 +02:00
peterkogo
2b0f83b72e cleanup 2024-06-27 10:31:30 +02:00
peterkogo
25dfeb1c02 dont invoke connection updates if the snapped handle stays the same 2024-06-26 18:12:56 +02:00
peterkogo
1a51428bd4 turns out default values for object parameters don't work as expected 2024-06-26 17:24:36 +02:00
peterkogo
8f12fde9eb Fixed NodeResizer for non-default node origins 2024-06-26 17:23:57 +02:00
moklick
08750d354f chore(utils): remove logs 2024-06-26 15:45:05 +02:00
moklick
f968ff42ca chore(react): node origin cleanup 2024-06-26 15:26:22 +02:00
peterkogo
5493f045ff streamlined connections 2024-06-26 15:03:12 +02:00
moklick
eed8856536 chore(xyresizer): cleanup 2024-06-25 16:50:40 +02:00
moklick
e22c1b9391 chore(node-resizer): update 2024-06-25 12:13:34 +02:00
peterkogo
44254648c8 changed naming and streamlined connections 2024-06-24 16:37:11 +02:00
moklick
1a25a7da48 fix(store): calc handle pos 2024-06-24 14:38:45 +02:00
Moritz Klack
67e29b6c25 Merge branch 'next' into absolute-origin 2024-06-24 12:57:24 +02:00
moklick
d0e166d4a8 chore(packages): bump 2024-06-20 13:40:36 +02:00
Peter Kogo
57b62f8d46 determine correct handle positions in for connections (#4384)
* determine correct handle positions in for connections

* refactor(handle-utils): cleanup

* refactor(handle-utils): cleanup

---------

Co-authored-by: moklick <info@moritzklack.com>
2024-06-20 10:28:50 +02:00
Peter Kogo
6cf0113005 Use correct end handle position when drawing a connection (#4382)
* use correct end handle position \when drawing connection lines

* provide correct connection end handle, also when connection is invalid

* add end handle position to connection despite being invalid

* chore(connectionline): remove logs

---------

Co-authored-by: moklick <info@moritzklack.com>
2024-06-19 17:15:07 +02:00
Moritz Klack
75acd24cee Rename updateEdge to reconnectEdge (#4373)
* refactor(edges): rename update to reconnect

* refactor(react): rename edge update to reconnect

* chore(examples): repair broken reconnect example

* chore(react): changelog
2024-06-19 16:57:30 +02:00
moklick
e6b21d372e chore(lint): cleanup minor issues 2024-06-11 17:19:58 +02:00
moklick
7895a5982d chore(packages): bump 2024-06-10 18:08:35 +02:00
moklick
c9d0f13328 fix(handles): calc offset correctly 2024-06-10 11:47:18 +02:00
moklick
5d6ac6e316 chore(packages): bump 2024-06-06 17:33:55 +02:00
moklick
2272c7f0e8 refactor(system): reduce getBoundingClientRect calls 2024-06-06 15:10:55 +02:00
Moritz Klack
7e50247b42 Merge pull request #4342 from xyflow/fix-node-drag-zoom
abort drag when multiple touches are detected
2024-06-06 12:57:16 +02:00
Moritz Klack
09a6f11aa1 Merge pull request #4341 from xyflow/fix-zoom-on-pinch-mobile
prevent zooming on mobile if zoomOnPinch is false
2024-06-06 12:55:43 +02:00
peterkogo
fd02d2f245 made comment more explicit 2024-06-05 16:35:08 +02:00
peterkogo
7547531306 abort drag when multiple touches are detected 2024-06-05 16:27:33 +02:00
peterkogo
99d0bc2cad prevent zooming on mobile if zoomOnPinch is false 2024-06-05 14:19:16 +02:00
Moritz Klack
2236138b8a Merge pull request #4339 from lcsfort/patch-1
fix: Correct parent node lookup in evaluateAbsolutePosition
2024-06-05 13:02:49 +02:00
moklick
48f07d5935 chore(packages): bump 2024-06-05 12:58:44 +02:00
moklick
a66bc2c2cc chore(system): cleanup d3 type usage 2024-06-05 12:57:33 +02:00
Luis Carlos
abeb4086d3 fix: Correct parent node lookup in evaluateAbsolutePosition
### Summary

This PR fixes a bug in the `evaluateAbsolutePosition` function where the incorrect parent node was being retrieved from the `nodeLookup` in each iteration of the while loop.

### Changes

- Modified the line `const parent = nodeLookup.get(parentId);` to `const parent = nodeLookup.get(nextParentId);`.

### Reason

The original implementation used `parentId` to look up the parent node, which did not change within the loop. This resulted in the same parent node being used for each iteration, leading to incorrect calculations of the absolute position. By using `nextParentId`, we ensure that the correct parent node is retrieved and used in each iteration.
2024-06-05 09:29:48 -01:00
moklick
3cc14e8ee5 refactor(nodes): add parentId to NodeProps closes #4061 2024-06-03 17:23:46 +02:00
peterkogo
403aa8f5da exposed selectable, deletable, draggable to custom nodes & edges 2024-06-03 10:48:05 +02:00
peterkogo
e81194d58a Include origin directly in positionAbsolute of node 2024-05-22 15:38:08 +02:00
moklick
02250e972d chore(packages): bump 2024-05-08 22:36:26 +02:00
moklick
ccadb043c3 refactor(system): mutate internal node instead of creating a new one 2024-05-08 22:20:13 +02:00
moklick
a364a93082 feat(react): add warning when styles not loaded #4047 2024-05-07 18:25:04 +02:00
moklick
2b0d75ddaa refactor(types): only export HandleProps but not HandleComponentProps 2024-05-07 16:22:26 +02:00
moklick
5f3dbbbade chore(versions): bump 2024-05-02 18:05:38 +02:00
moklick
ce9ce1db0b fix(system): return user nodes in node drag/click handlers 2024-05-02 17:40:48 +02:00
moklick
f2f2c3cc2e feat(svelte): add fitViewOptions for Controls closes #4201 2024-05-02 15:36:42 +02:00
moklick
170ef688a8 chore(react): changelog 2024-04-30 17:52:06 +02:00
Moritz Klack
b67ff60d5c Merge pull request #4226 from DenizUgur/update-node-internals-typing
fix typing for `UpdateNodeInternals`
2024-04-30 17:48:35 +02:00
moklick
d1b50707ff fix(system): pinch zoom on windows #3759 2024-04-30 16:42:33 +02:00