Braks
9c7c2368a0
update(types): remove promise from addelements
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
update(store): remove promise from setElements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
929a6e637b
update(edges): Add edge as param to edgeupdateend event
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
7916b20a99
fix(types): edge-text typing
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
96d54c59dc
refactor(store): check if state variables have to be re-set
...
* instead of just pasting over the state constantly check what needs to be re-set
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
74cc61ad8d
feat(utils): make addEdge and removeElement mutate the array passed in
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
1ce41ccd40
refactor: move init function to store as setState
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
5ffeb928ae
refactor: move parseElements to graph utils
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
cf2ded4fc8
update: types in SelectionPane.vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
8b0ddc9be9
refactor(types): Remove SourceTargetNode-type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
729d3d5ca2
update(examples): remove watchEffect from UpdateNodeExample.vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
update(examples): fix style calculation in CustomNode.vue
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
708fa1f970
refactor(options)!: remove worker and store option
...
* either unnecessary, broken or needs more work
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
725dc8acb7
refactor(store): remove nodes/edges field
...
* nodes/edges are accessed via getter - that retains reactivity on elements
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
23bceea255
update: use getNodes in zoom pan helper
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
e6a54d482a
update: import path in node wrapper
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
fa63dee37a
refactor: remove node-pos actions
...
* add getSelectedNodes getter
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
ac2e2d5f0a
refactor: remove updateNodePosDiff from node selection
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
729ae4c902
refactor: remove vf prop
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
8f65918760
refactor(nodes): use v-model to reactively change node props
...
* instead of re-parsing we proxy the node values and change them with a v-model
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
84bad861ea
refactor(nodes): remove __vf.position
...
* duplicate position values as __vf.position and position save the same values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
89849f4eac
update(connection): pass source node to ConnectionLine as prop
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
04b64de1de
update: use getNodes in minimap instead of directly accessing nodes state val
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
409a268ddd
fix(examples): wrong type added to button-edge
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 01:05:03 +01:00
Braks
b140b84ccd
fix(flow): check diff before re-parsing elements
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 01:02:32 +01:00
Braks
e065df5afc
fix(flow): Add watcher that observes elements length for re-parsing
...
* instead of deeply watching the elements' arr (which would cause a re-parsing on any element pos change, like dragging a node) we watch the elements + elements arr length and re-parse as necessary
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:36:57 +01:00
Braks
f4559398f6
fix(examples): interaction example firing events wrong
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:22:09 +01:00
Braks
f5dcd5108c
fix(nodes): pass correct store values to node wrapper
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:21:23 +01:00
Braks
5011bf035e
fix(nodes): missing element click event
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:20:58 +01:00
Braks
da4fd4f7ce
feat(nodes): Allow nodes to pass all draggable options
...
* omits scale, grid, enableuserselecthack and enabletransformfix as valid options for draggable
* remove event interface and emits from nodewrapper
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-24 00:02:30 +01:00
Braks
71a10b2536
feat(nodes): Allow nodes to have their own snapGrid option
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
1eac951055
feat(types): add DefaultEdgeTypes-type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
feat(types): Add DefaultNodeTypes-type
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
feat(types): Add DefaultNodeTypes and DefaultEdgeTypes to the exports object
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
073b25ec60
feat(zoom): Add offset to fitview-params
...
* Allow for offsetting fit view by x or y values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:58:11 +01:00
Braks
db70409337
fix(types): hooks to return a graph-node type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 23:20:49 +01:00
Braks
7829b6a1a8
v0.1.7
2021-11-23 18:27:28 +01:00
Braks
d22e21041d
fix(edges): edges not reacting to hidden nodes
...
* Change getEdges to parse edges with source & target nodes and filter if one of them is missing
* add new type for Edges w sourceTargetNode called GraphEdge which is the return type of getEdges
*
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 18:25:08 +01:00
Braks
cddf875b6d
feat(types): Add GraphEdge type
...
* GraphEdges are edges that have been parsed and have a sourceTargetNode property
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:46:55 +01:00
Braks
091f3f82c2
update(types): export flowprops and custom connection line props type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:46:28 +01:00
Braks
ca46d6a771
update(zoom): when zoom is deactivated we disbale scrolling
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:35:40 +01:00
Braks
d57b94d0bf
v0.1.6
2021-11-23 17:19:49 +01:00
Braks
c286b3b7ff
fix(flow): preventScrolling missing in props definition
...
* remove console log from ZoomPane
* Add missing name to VueFlow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 17:18:35 +01:00
Braks
65250c224b
v0.1.5
2021-11-23 16:57:05 +01:00
Braks
3f758c529c
chore(deps): update revue-draggable to 0.3.9
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 16:56:35 +01:00
Braks
c0f7e5c9e9
update: add scale prop to draggable
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 16:56:16 +01:00
Braks
dbe82a718a
fix: node selection not working if selectable === undefined
...
* selectable has to be explicitly false for node selection to skip the node
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 16:17:46 +01:00
Braks
8d08f67ee6
update: remove fallback operator
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 16:17:20 +01:00
Braks
54d5780feb
fix: missing props on Draggable
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 16:17:02 +01:00
Braks
8ec494da1e
v0.1.4
2021-11-23 14:39:20 +01:00
Braks
67634fd72e
feat(connection): Extend connection line props for more advanced usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 14:38:49 +01:00
Braks
345312728c
v0.1.3
2021-11-23 14:17:13 +01:00
Braks
46ecec5366
feat(options): add preventScrolling option
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 14:12:43 +01:00
Braks
17f7e4b0e7
fix(nodes): dont select nodes when selectable=false closes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 14:01:02 +01:00
Braks
0e803839d6
feat(BezierEdge): use quadratic bezier curve for top-left and bottom-right edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 13:58:20 +01:00
Braks
9ec1c4dc2b
fix: remove deep flag from elements and store-elements watcher
...
* deep watching causes a reset after positions change
* fallback to non-worker parsing
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 13:55:41 +01:00
Braks
1f77b77fe7
v0.1.2
2021-11-23 13:01:38 +01:00
Braks
d87388fbe6
fix: connection line position incorrectly calculated
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-23 13:00:29 +01:00
Braks
94dcb0c03d
v0.1.1
2021-11-22 21:44:59 +01:00
Braks
0dd5ed7836
fix(types): edge text type
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 21:38:31 +01:00
Braks
0b57ee167e
refactor: remove node/edge-renderer slots
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:42:00 +01:00
Braks
c7dca2cbd0
refactor: change prop types for NodeWrapper
...
* don't split node prop into smaller ones
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:33:12 +01:00
Braks
f86033c1e8
refactor: change prop types for EdgeWrapper
...
* don't split edge prop into smaller ones
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:25:25 +01:00
Braks
b9bb3cfb1a
update(types): remove null types and use undefined
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 17:14:57 +01:00
Braks
fec38a129a
fix!: prop typings
...
* remove wrapper exports from library
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 15:49:27 +01:00
Braks
4932c64d52
update: define emittable events for EdgeWrapper
...
* add onEdgeUpdateEnd callback to useHandle
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 15:13:46 +01:00
Braks
1ea6e4f8da
update: pass selected elements as prop to nodesselection
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:22:35 +01:00
Braks
5c3a1fba13
update: remove useStore from handle
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:22:11 +01:00
Braks
049b701580
update: use controlledComputed for edges/nodes
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 14:10:49 +01:00
Braks
2b065b4e56
update: pass store state as props to edge-renderer and edge
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 13:40:25 +01:00
Braks
ebd0f9e738
update!: Remove renderer exports
...
* Slot remains, but default built-in renderer isn't part of the library export
* If a custom renderer is desired, a slot can be used to implement one
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 12:26:47 +01:00
Braks
6059b02e44
update: Pass down values as props instead of relying on store
...
* store values are passed down by main vue flow component
* store is only used to emit events or if really necessary in the component
* add keys with store id to elements
*
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 12:25:32 +01:00
Braks
c35673c622
refactor: pass props to edge/nodewrapper separately
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-22 01:22:27 +01:00
Braks
a03f658794
v0.1.0
2021-11-21 21:53:23 +01:00
Braks
a55e33f91f
feat: add draghandle prop to node
...
* specify a drag handle on the node
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 21:50:49 +01:00
Braks
b10207021f
refactor(types)!: Change ConnectionLineComponentProps to ConnectionLineProps
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 19:05:24 +01:00
Braks
3e4433c175
fix: skip dimensions check when ssr
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:48:24 +01:00
Braks
f64ae24ee2
update: Add name to flow component
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:20:51 +01:00
Braks
502be52572
update: add hmr to statestore
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:20:03 +01:00
Braks
a67e6c4430
fix: minimap prop type missing
...
* cant import stringfunc type (string literal and all...)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:19:43 +01:00
Braks
c48a0a9e2a
fix: add missing click and doubleclick events to nodes/edges
...
* ssr bug
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 18:19:06 +01:00
Braks
fd71e1e16e
update: Add names to components
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:54:59 +01:00
Braks
d24de0c0c2
update: move component related types to component-type file
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:54:24 +01:00
Braks
062aee45b2
update!: graphnode and node typing
...
* graphnode is a node containing internal Vue Flow data
* move util files to util directory
* move flow actions type into store file
* rename panel type file to zoom
* rename types file to flow
* Rename Node to NodeWrapper
* Rename Edge to EdgeWrapper
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 16:25:27 +01:00
Braks
ba24f3ca62
update(edges): useAttrs on edges to use style
...
* remove class and style props, pass them as attrs
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 13:33:59 +01:00
Braks
e4ead738c9
update(types): Correct __vf typing
...
* fix all uses of __vf so the actual type works properly
* correct the class and style props
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 13:33:12 +01:00
Braks
0e9f8c5fc2
refactor: rename internal data field to __vf
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 12:54:04 +01:00
Braks
71ba905348
fix: zoom values being initialized before zoom is ready
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 12:49:44 +01:00
Braks
da29a613f0
feat(slots): Add node and edge renderer slots
...
* more flexibility by having the ability to use the node/edge-renderer and wrapper
* export renderer and wrapper from lib entry
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-21 12:34:28 +01:00
Braks
39b21faa5b
refactor(types)!: Remove elements prop, change EdgeTypes/NodeTypes prop to string[]
...
* no more elements prop - v-model instead!
* Instead of passing an object map to components just pass in an array of strings as nodeTypes/edgeTypes object
* the string name will either be resolved to a dynamic component with :is="type" or a slot with the type-name
* update all examples
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 22:10:25 +01:00
Braks
0a1c2d4ede
update: some comments
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 20:11:33 +01:00
Braks
e648e1a179
feat: make worker optional
...
* worker can be enabled with prop, defaults to false
* add deep unref function
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 19:56:35 +01:00
Braks
668fed1dc4
feat: Add dedicated default loading component
...
* add option to pass a transition name
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 18:22:30 +01:00
Braks
4e8ff6201a
feat: Add loading indicator slot and prop
...
* While the graph is suspended we open up a loading indicator slot
* a prop option has to be passed to enable the indicator
* add some styles for a default loading text
* move loading event to after store has been initialized *and* zoom pane dimensions are present
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 17:33:27 +01:00
Braks
d335944e56
feat: offload parsing elements to worker
...
* when we're not in ssr environment we use a web worker to parse the elements as this blocks the main thread when there's a good amount of nodes/edges to parse
* when in ssr we don't really care about the main thread blocking so we just parse them like usual
* update vite to latest
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 16:22:31 +01:00
Braks
d1e59ef322
v0.0.34
2021-11-20 03:29:20 +01:00
Braks
1b6ea1e1b5
update: make types for nodes and edges a computed prop
...
* remove nodeTypesId (was used in react to manually trigger a nodeTypes change)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 03:28:46 +01:00
Braks
2b87d53c10
update: dont render nodes, edges if dimensions dont return a truthy value
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 03:18:09 +01:00
Braks
68b7d99a9c
fix: load hook timing
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 02:15:12 +01:00
Braks
f5f16b6c43
v0.0.33
2021-11-20 02:02:17 +01:00
Braks
d25fa579e4
fix: suspension not working properly
...
* move invoke to vueflow to suspend
* await dimensions in Node/Edge-wrapper components
* await nodes/edges in renderer
* await elements in VueFlow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 02:00:37 +01:00
Braks
a4e3bf52c7
v0.0.32
2021-11-20 01:21:41 +01:00
Braks
990126b2b9
fix: onLoad being triggered when elements aren't ready
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-20 01:20:47 +01:00
Braks
c40e4962e3
v0.0.31
2021-11-20 00:47:01 +01:00