Braks
01f5456407
fix: setState syntax error
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:30:19 +01:00
Braks
e73a55af62
update: zoom-pane style
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
c3f8809362
fix: import paths in components
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
0b2764028f
update(nodes): watch nodes width for dimension update
...
* add force param to setElements, if set we clear the elements arr (default true)
* wait for store watcher until store is ready (i.e. a state has been set)
* move renderer css class to Renderer.vue
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
5b00049a65
refactor(flow): deferr initial loading to Renderer.vue component
...
* suspend flow while async processing is going on (fallback to loading component)
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 19:29:13 +01:00
Braks
4408ca1eb7
refactor(graph): async process elements
...
* process elements in chunks of 50 per ms to avoid blocking main thread
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
refactor(flow): deferr initial loading to Renderer.vue component
2021-11-25 19:29:13 +01:00
Braks
6c3bce88a7
update(graph): mutate elements arr on updateEdge
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
bd140f1549
update(flow): remove store, worker props
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
f2e38ca7ac
update(nodes): add __vf to node props
...
* move edge/node component-types to components file
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
3855e9fe3f
update(flow): remove worker prop
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
bb0b9049ea
fix(flow): props not being watched on time
...
* updated example for UpdateNode
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
233e915376
update(store): remove promise from setState
...
* add default values for nodeTypes/edgeTypes - empty array for customs
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
fd83a6d365
fix(store): parsing overwriting __vf fields or not writing them at all
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
5ceee98e9b
fix(store): check if state option is typeof undefined before setting (not just false-ish)
...
update: export useWindow
update: remove logs from useHandle
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
9e941966a4
feat(nodes): add option to pass a valid target pos / valid source pos func to nodes
...
* edge updater cannot discern a valid connection by itself so we allow an option to pass a valid connection func to nodes which will then be used to determine if updating connection is valid
* it is optional, by default all connections are valid
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
95fc013613
update(flow): set modelValue after initialization of elements
...
* remove extra edge parsing
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
Braks
7b4dde4411
update(store): typing of edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 15:21:36 +01:00
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
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
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
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
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