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
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
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
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
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
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
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
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
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
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
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
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
054e71a609
feat: Add instance to store
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 13:46:37 +01:00
Braks
8605909f5d
feat: export default edge and node types object
...
* set isReady after load-hook trigger
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-19 01:55:48 +01:00
Braks
470ab3782a
update: remove useHooks usage
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 23:17:09 +01:00
Braks
99dbd4b2cc
feat!: Add hooks to store
...
* For easier access and to avoid context issues with injections hooks are put into the store
* hooks can be accessed and will emit events when the flow has bound its emit function to the hooks
* useHooks and useStore are not exported anymore! Instead, useVueFlow is provided, which will return an instance of the current vue flow store
* Rename NodeIdContextKey to NodeId
* Add addElements function to store to add elements without having to re-set the whole store
* use v-model for elements, re-set elements only if there's an actual change
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 21:24:20 +01:00
Braks
90a2a6544d
update(zoom): remove watcher and use until
...
* wait until height and width are set for zoom pane to trigger load hook
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:32:30 +01:00
Braks
60327c4ca0
update(zoom): clamp transform values
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:14:05 +01:00
Braks
14980e38b7
feat: Add suspensions to node, noderenderer and around zoom-pane
...
* bind zoompanhelper functions to zoom-pane slot
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 14:08:46 +01:00
Braks
54dfd8498b
feat: add zoom-pane slot
...
* if the user wants to pass a slot into zoom pane
* props are the current width/height and transform values
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 13:40:51 +01:00
Braks
b918eb6b89
fix: event propagation from zoom
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:23:36 +01:00
Braks
812a7da2fe
fix: move slots outside of zoom pane
...
* avoids zoom gesture events bubbling to zoom pane and causing elements over flow to trigger zoom when they shouldn't
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-18 03:06:21 +01:00
Braks
43ce52347c
update: invoke until func in zoom pane
...
* instead of using .then cb we use the invoke func to call the async await and wait for the zoomPaneEl
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 10:04:28 +01:00
Braks
954722aac2
feat(zoom): Add suspension to zoom pane
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 09:44:26 +01:00
Braks
10215b4631
update: create vue.d.ts files
...
* add vue-tsc to emit d.ts files from vue components
* use absolute paths in components
* avoids conflicts with ts custom paths in vue-tsc generated vue.d.ts files
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 01:39:50 +01:00
Braks
6b4cb9e937
update(docs): README.md
...
* minor updates in zoompane and interaction example
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-17 00:35:21 +01:00
Braks
7c66cf5d9b
update!: Remove update node internals composable
...
* It's practically useless as vue doesn't need the trigger to catch a re-render
* Remove unused types
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-16 12:58:16 +01:00
Braks
3705a39fa8
refactor: perfomance optimisations through less dependency tracking
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-15 11:22:56 +01:00
Braks
aaf5f608f5
feat: add path alias for src
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 09:38:02 +01:00
Braks
5437d48325
fix: custom node example not fitting view
...
* fit view can't work (for the onLoad event) for elements assigned after the host has mounted (onMounted hook) as we can't calculate a rect of elements that don't exist at flow creation
* in this case just trigger fit view __after__ elements have been created/passed to the flow
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 08:54:35 +01:00
Braks
a8f7cc2389
fix: zoom pane not scaling
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 08:54:35 +01:00
Braks
3931a59524
fix(docs): dedupe and add alias for vue
...
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-11-06 08:54:35 +01:00
Braks
61779638ac
update(dist): Remove rollup and use vite to build lib
...
* Remove custom tsconfig paths to avoid resolving issues on published package
2021-11-06 08:54:35 +01:00
Braks
babcbd0e1f
update: Flow instance provides update node internals func
...
* Rename onLoadParams to FlowInstance
* Pass update node internals to instance
2021-10-22 12:39:55 +02:00
Braks
20e9d1d396
update: fix names
2021-10-21 17:42:33 +02:00
Braks
0e79718720
update: Add validConnectFunc as prop to handle
2021-10-21 14:28:11 +02:00
Braks
ca2901bc01
fix: zoom pan helper not being initialized timely
2021-10-21 13:46:15 +02:00
Braks
2bfecf7148
update: change name to vue flow
...
* Add gif to readme
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com >
2021-10-20 22:39:54 +02:00
Braks
b2b1fe822f
feat: add useStore and useHooks composables that provide default store/hooks
2021-10-20 22:39:54 +02:00
Braks
61dc9dea33
fix: edges and edge anchors not re-calculating correctly
2021-10-20 22:39:54 +02:00
Braks
7ecbcba7eb
fix: edge anchor
2021-10-20 22:39:54 +02:00
Braks
9d9a90e9a7
update: Add slots to CustomConnectionLine.vue, Edge.vue, Node.vue
2021-10-20 22:39:54 +02:00
Braks
c3fb3cd10a
fix: zoom pan helper
2021-10-20 22:39:54 +02:00
Braks
a895853b64
update: Add injection keys
2021-10-20 22:39:54 +02:00
Braks
a5ae6a4e48
update(deps): Add unplugin-components
...
fix: Excessive rerender of edge texts
update(script-setup): Update some examples
* Remove more jsx files
2021-10-20 22:39:54 +02:00
Braks
77eac0c12a
chore(lint): Update eslint rules
...
* Remove semi
2021-10-20 22:39:54 +02:00
Braks
5ed1094dfe
feat: Add cb to useKeyPress
2021-08-18 09:51:10 +02:00