Commit Graph
813 Commits
Author SHA1 Message Date
Samuel Degueldre 2adf37849b ref: stop using try..catch as control flow in Wrapper
Previously, Wrapper used try..catch around a call to useStoreApi to
check whether there was an available StoreContext, instead of simply
using useContext and checking the value. This leads to poor developer
experience when using the devtools feature "pause on caught exceptions"
as it causes the devtools to break on every render of a Wrapper that is
not within a StoreContext provider. The catch is also universal, meaning
that it could catch a completely unrelated error and happily keep going
instead of crashing which is undesirable.

This commit changes this try..catch into a simple call to useContext to
check if a StoreContext is available.
2022-11-23 13:23:28 +01:00
Christopher Möller f776239ecb feat(resize-node): example implementation of resize component 2022-11-22 16:13:23 +01:00
Jack Fishwick 2f767408ca chore: fix typing on 'isSelectionMode'. 2022-11-22 11:05:48 +00:00
Jack Fishwick a8e414e4a2 feat: display the pointer when in selection mode. 2022-11-22 11:05:48 +00:00
Jack Fishwick 64c8491761 bug fix: more post rebase fixes. 2022-11-22 11:05:48 +00:00
Jack Fishwick 35bc158ade bug fix: fixes post rebase. 2022-11-22 11:05:48 +00:00
Jack Fishwick 09ebd0c84a feat: allow customisation of how the select box works. 2022-11-22 11:05:45 +00:00
Jack Fishwick f25c7fe8a2 feat: pass through onSelectionStart in GraphView. 2022-11-22 11:05:13 +00:00
Jack Fishwick 1de6de1f96 feat: add events for when selection starts and ends. 2022-11-22 11:04:01 +00:00
Jack Fishwick 4e874b90a8 feat: select overlapping nodes, even if not fully within box. 2022-11-22 10:56:18 +00:00
Jack Fishwick 6fe85b2cbe bug fix: handle all mouse move events not just ones on the target. 2022-11-22 10:55:07 +00:00
Jack Fishwick 44097c15c9 tests: start fixing cypress tests. 2022-11-22 10:55:06 +00:00
Jack Fishwick 3c94b22ac1 bug fix: fix not panning on selection button press. 2022-11-22 10:55:06 +00:00
Jack Fishwick 1c6ac9193f bug fix: do not panOnDrag if the selection button is pressed. 2022-11-22 10:55:06 +00:00
Jack Fishwick f0baf64725 bug fix: only handle mouse events that were targeted at the selection pane. 2022-11-22 10:55:06 +00:00
Jack Fishwick 45dfcfd4ee feat: don't ignore user selection on mouse leave as we may have selected nodes. 2022-11-22 10:55:06 +00:00
Jack Fishwick a2eff8f834 feat: clear selection when starting new selection. 2022-11-22 10:55:06 +00:00
Jack Fishwick a1c830c086 feat: make sure 'onPaneContextMenu' still works with panOnDrag = 'RightClick'. 2022-11-22 10:55:06 +00:00
Jack Fishwick e22938b49f feat: do not remove node selection on leave. 2022-11-22 10:55:06 +00:00
Jack Fishwick 3969544fdf feat: do not clear the selection when you mouse out. 2022-11-22 10:55:06 +00:00
Jack Fishwick 00282c2cb4 feat: only trigger a pane 'click' if there is no movement. 2022-11-22 10:55:06 +00:00
Jack Fishwick b65cc1229d feat: add option for right click movement. 2022-11-22 10:55:06 +00:00
Jack Fishwick 3169589fbc feat: make sure 'panOnDrag' overrides 'selectBoxOnDrag'. 2022-11-22 10:55:06 +00:00
Jack Fishwick 55811169da feat: handle selection mode properly. Up z-index for selection box. 2022-11-22 10:55:06 +00:00
Jack Fishwick 45c407755f feat: only click when not moved. 2022-11-22 10:55:06 +00:00
Jack Fishwick da08e69e78 feat: condense user selection into pane. 2022-11-22 10:55:06 +00:00
Jack Fishwick 707ee19875 feat: block pan on scroll if we are making a selection. 2022-11-22 10:55:06 +00:00
Jack Fishwick 33e730d7b4 bug fix: make sure we actually update event handlers when selection begins. 2022-11-22 10:55:06 +00:00
Jack Fishwick 685ff76ee8 feat: add a selectBoxOnDrag prop which allows select box to be triggered without an additional key press. 2022-11-22 10:55:06 +00:00
moklick a458564bfc chore(packages): bump versions 2022-11-21 14:53:18 +01:00
moklick 493d748c18 chore(connection-line): use type for imports 2022-11-17 14:53:32 +01:00
moklick 8e6a353d58 fix(updatable-edge): fix disappearing connection line for loose flows closes #2529 2022-11-17 14:51:26 +01:00
Christopher Möller 4ebbea1960 chore(node-toolbar): set initial package version 2022-11-17 11:36:12 +01:00
Christopher MöllerandGitHub b2acca333f Merge pull request #2563 from wbkd/feat/node-toolbar
feat(node-toolbar): add node-toolbar component
2022-11-17 11:29:31 +01:00
Christopher Möller b31d8e9dc2 feat(node-toolbar): remove css from node-toolbar component, set version to 1.0.0 2022-11-17 09:59:28 +01:00
moklick 1841dfa2ca refactor(node-toolbar): define zustand selector outside of the component 2022-11-16 18:28:25 +01:00
Christopher Möller 96e53e4408 Merge branch 'feat/node-toolbar' of github.com:wbkd/react-flow into feat/node-toolbar 2022-11-16 13:55:55 +01:00
Christopher Möller edbf894350 feat(node-toolbar): change isActive to isVisible and implement default behavior 2022-11-16 13:49:15 +01:00
moklick be8f22e5f3 chore(node-toolbar): cleanup 2022-11-16 10:59:20 +01:00
moklick 6bb576c77f Merge branch 'next-release' into feat/node-toolbar 2022-11-16 10:53:34 +01:00
moklick ccbffeb139 fix(node-toolbar): handle nodeOrigin 2022-11-16 10:53:26 +01:00
Christopher Möller 20a6653577 feat(node-toolbar): use z-index of the node for the toolbar 2022-11-16 09:56:34 +01:00
Christopher Möller beba0a32de feat(node-toolbar): add node-toolbar component 2022-11-15 21:48:08 +01:00
moklick 5897f6de02 feat(minimap): add maskStrokeWidth and maskStrokeColor 2022-11-15 16:47:15 +01:00
moklick 7fab7b6a54 Merge branch 'next-release' into fix/selection-rect 2022-11-15 16:09:35 +01:00
moklick b70ede04f3 fix(nodeOrigin): repair multi selection and fitView 2022-11-15 16:00:21 +01:00
Moritz KlackandGitHub 5211b5a0d5 Merge pull request #2560 from wbkd/neo-patch-4
Always elevate 1000 in `zIndex` when node is selected
2022-11-15 11:55:54 +01:00
moklick be89fe0020 refactor(edge-label-renderer): simplify selector 2022-11-15 11:18:12 +01:00
moklick f392ffbc4f Merge branch 'prevent-multiple-edge-label-renderers-collide-with-each-other' of github.com:liuruenshen/react-flow into liuruenshen-prevent-multiple-edge-label-renderers-collide-with-each-other 2022-11-15 11:05:32 +01:00
Christopher Möller a5963e62b6 feat(minimap): turn ariaLabel into an optional property 2022-11-14 15:28:15 +01:00