Braks
0e48b77e14
regression: calculate handle bounds regardless of update
2022-04-04 21:42:48 +02:00
Braks
0a079afcee
refactor(nodes)!: Change children API to parentNode API
...
* instead of passing a children arr, pass a parentNode id
* allows for easier adding of new child nodes in options api
2022-04-04 21:42:48 +02:00
Braks
271d793327
fix: edges not selected on user selection
2022-04-04 21:42:48 +02:00
Braks
da2e95a517
refactor(store): rename selectionActive to userSelectionActive
2022-04-04 21:42:48 +02:00
Braks
56f7e3b0c2
feat: Add SimpleBezierEdge
...
* Implement base edge
2022-04-04 21:42:48 +02:00
Braks
0bb54d6d36
refactor(zoom): Rename paneMovable to panOnDrag
2022-04-04 21:42:48 +02:00
Braks
9a8bf69848
feat: Add default edge options
2022-04-04 21:42:48 +02:00
Braks
728046505c
refactor(store): use null instead of undefined for optional state properties
...
* remove setConnectionNodeId action
2022-04-04 21:42:48 +02:00
Braks
188156dd0b
fix(store): setting store state after init
2022-04-04 21:42:48 +02:00
Braks
c818a5863c
fix(nodes): pass all required props to node components
2022-04-04 21:42:48 +02:00
Braks
7d4a5fdead
refactor(store): shorten setState
2022-04-04 21:42:48 +02:00
Braks
0093df43a9
feat(nodes, edges, store): Add updateNodeDimensions actions
...
* Returns new changes for updating node dimensions
* Add expandParent prop to nodes when parents should be expanded to fit the new child in them
*
2022-04-04 21:42:48 +02:00
Braks
3539937752
refactor(store): shorten default state setter function
2022-03-24 16:52:52 +01:00
Braks
9a8caf444c
feat(store): Enable using a parentNode / parentNodeId to add child nodes
2022-03-23 17:43:27 +01:00
Braks
6a2c1b00d7
feat: Enable passing components as node/edge-types
...
* Instead of using slots (re)-enable passing components for node/edge-types
2022-03-23 15:49:00 +01:00
Braks
65d079db20
feat: use a storage class to map flow instances
...
* improves cleanup of instances
2022-03-23 06:47:57 +01:00
Braks
d948f5eef4
feat(zoom): Allow zoomOnScroll & panOnScroll to be used without an activation key
...
* activation key is undefined by default, if undefined key is always "pressed"
2022-03-14 14:10:38 +01:00
bcakmakoglu
c31deb897d
update(edges): filter edges of hidden nodes
...
* we don't want to show edges that go seemingly nowhere
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-03-08 16:34:50 +01:00
bcakmakoglu
46a63c29aa
fix(store): updateEdge action not fully updating an edge
...
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-03-08 16:10:33 +01:00
bcakmakoglu
6746d6bb46
fix(flow): fix typo in paneMovable prop
...
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-03-08 12:07:57 +01:00
bcakmakoglu
c5b39d4588
feat: try to dispose states on unmount
...
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-02-21 20:25:17 +01:00
bcakmakoglu
8260eabc58
fix: typings for UseVueFlow
...
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-02-21 20:25:17 +01:00
bcakmakoglu
f44784b1d0
chore: fix examples
...
Signed-off-by: bcakmakoglu <78412429+bcakmakoglu@users.noreply.github.com >
2022-02-21 20:25:17 +01:00
Braks
ca85d8002e
refactor(flow)!: Remove useElementsState utility
...
* to avoid confusion and duplicates remove the useElementsState utilities
* move functionality to store actions
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2022-02-21 20:25:17 +01:00
Braks
2910731c3b
refactor(flow): set elements when initializing store
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a9e7eb31ea
feat(flow): Narrow options type for useNodesState/useEdgesState/useElementsState
...
* remove storageKey
* make modelValue optional
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
ee6bf3252e
refactor(flow): Watch models
...
* replace model value after re-setting elements/nodes/edges
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
5457106905
refactor(store): remove setting elements without parsing in state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
445718d6f4
update(examples): correct examples
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
b12863f297
refactor(flow): lowercase event names (OnPaneLoad -> onPaneLoad)
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
e64f6b7bc6
update(types)!: Rename FlowActions/FlowGetters etc. to Actions, Getters
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
e2e094b987
feat(flow): Add option to disable default change handlers globally
...
* overwrites applyDefault setting for useEdgeState/useNodeState/useElementsState
* export apply change handlers
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
b9a417a629
chore: remove unused imports
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
f8a23c59ec
refactor(flow)!: Use watcher to change every prop as a single item
...
* instead of replacing the whole state on each watch trigger, split into multiple watchers that set a single state
* improve reacitivty and two-way binding for v-models
* remove elements option -> only modelValue (old api) or nodes/edges
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
91009e1dca
feat(store): add store as refs to useVueFlow
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
758f4f23ff
refactor(store): Rename isReady to paneReady
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
518d12d381
feat(flow): add utilities to useState functions
2021-12-20 19:29:52 +01:00
Braks
17a1b08ee0
refactor(store)!: replace store injection with VueFlow injection
2021-12-20 19:29:52 +01:00
Braks
c80ab8fe50
feat(store, flow)!: Add useNode/useEdge-state helpers
...
* for two way binding use the helpers
2021-12-20 19:29:52 +01:00
Braks
81c8145f3a
feat(store, flow)!: Add apply changes handlers
...
* flow will not update changes unless a handler to apply changes is passed
* a default handler is available in the useVueFlow composable
* removeElements export removed
2021-12-20 19:29:52 +01:00
Braks
c1da504fa9
refactor(store): move hooks to store dir
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
d875cfede3
feat(flow): Add event listener to vueflow object
...
* event listener also exist in store state (hooksOn)
* add applyChangesHandlers to vueflow object, can be used to apply changes i.e. deleting etc.
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
02911b4177
refactor(store): when adding elements as selected disable emit
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
ca2eca4265
refactor(store): add getters for selected nodes/edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
a80d475216
refactor(store): remove useStore.ts and move logic to store.ts
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
60fcbc2d06
refactor(nodes): use watcher to calc xyzpos
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
774cb2e644
feat(flow)!: Remove node/edge-types prop
...
* infer node/edge types from types used in elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
4065354c10
refactor(store): add selectednodesbbox back to state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
9abd768bce
fix(edges): connection line not showing up when no edges are defined
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00
Braks
63301cc000
update(store): Add utils to state
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-12-20 19:29:52 +01:00