Braks
4740a2c8fe
update(hooks): add elementsProcessed event hook
...
* triggered after elements have been processed and updated in store
* add missing selection change trigger to store
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 13:54:49 +01:00
Braks
b88f2105fb
update(edges): add updatable as prop to edges
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 11:30:23 +01:00
Braks
f0ca05f0c4
v0.2.2
2021-11-26 11:28:35 +01:00
Braks
512df8e42b
update(store): use setElements for addElements with force set false
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 11:26:37 +01:00
Braks
4630f3efc1
refactor(edges): Make edge updating optional
...
* add an option to enable edge updating globally
* pass an option to an edge to enable updating for a single edge
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-26 11:08:12 +01:00
Braks
98b6fdb717
update: watch node height too for updating dimensions
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-25 20:38:52 +01:00
Braks
166d83725b
v0.2.1
2021-11-25 19:30:40 +01:00
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
50fc0f2fd8
v0.2.0
2021-11-25 15:26:22 +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
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
破耳狼 and Braks
63630015a7
Update README.md
2021-11-24 09:53:32 +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