Commit Graph
71 Commits
Author SHA1 Message Date
Braks 69ed530198 chore(pkg): explicitly export defaults from vue files 2022-05-11 22:10:40 +02:00
Braks 22845c210d chore: lint files 2022-05-11 22:10:40 +02:00
Braks be2a37246a feat: export base edge 2022-05-11 22:10:40 +02:00
Braks 1b97109b94 refactor: remove scoped slot props from handles 2022-04-24 13:34:22 +02:00
Braks 9cc7806972 fix(edges): Cancel edge update if connection exists 2022-04-24 13:34:22 +02:00
Braks 0becad73ad refactor(nodes): minimize position change loops
# What's changed?

* Only loop selected nodes instead of all nodes when determining position changes
2022-04-24 13:34:22 +02:00
Braks e2fd3b44ef refactor(edges): defer grouping to next tick 2022-04-24 13:34:22 +02:00
Braks f5d245322b feat: Add emits property to store
# What's changed?

* For easier access (and shorter syntax) of event emitters add emits property to store
* Change instance, zoom, hooks, emits and onEvent triggers to readonly
2022-04-24 13:34:22 +02:00
Braks b6848e37c8 refactor(nodes,edges): Pass type component as prop
# What's changed?

* Pass component as prop
* Reduce watcher and computed
* Add reactivity transform macros to examples
2022-04-24 13:34:22 +02:00
Braks 14ef119a95 fix(nodes): use label content as inner html 2022-04-24 13:34:22 +02:00
Braks 4eb775477f fix(nodes): Add draggable watchers 2022-04-24 13:34:22 +02:00
Braks 6d1fb963b3 chore: correct watcher 2022-04-24 13:34:22 +02:00
Braks dc1d71d0bd refactor: Destructure props with reactivity transform 2022-04-24 13:34:22 +02:00
Braks e722f49e6e refactor(types,flow)!: Use reactivity transform and remove store property
# What's changed?

* Remove store property from usevueflow return value
* All previously available properties are still there, just not nested inside an additional store object to avoid confusion + duplicates
* use reactivity transform to get rid of .value calls
2022-04-24 13:34:22 +02:00
Braks 3bc972a1d1 chore: reorganize edgewrapper 2022-04-24 13:34:22 +02:00
Braks 869d88cdcf chore: reorganize nodewrapper 2022-04-24 13:34:22 +02:00
Braks cd85eb1842 chore: disable inheriting attrs 2022-04-24 13:34:22 +02:00
Braks 21570209d8 chore: remove unused attrs 2022-04-24 13:34:22 +02:00
Braks 4e73c5b2fb regression: reassign keys 2022-04-24 13:34:22 +02:00
Braks 8d33014291 refactor(nodes,edges): change defaults to functional components
# What's changed?

* Change default node/edge components to functional components
2022-04-24 13:34:22 +02:00
Braks 0519bd0f25 chore: Remove casting node/edge to null on unmount 2022-04-24 13:34:22 +02:00
Braks 7f54d3a38e refactor(edges): Remove base edge from default edge types
# What's changed?

* Remove base-edge component for performance
2022-04-24 13:34:22 +02:00
Braks f1bbed1751 refactor(edges): Change base edge to functional component
# What's changed?

* Change base edge into a functional component (doesn't need a state)
* Export base edge for convenience
2022-04-24 13:34:22 +02:00
Braks b6d8b57859 chore: Performance optimizations
# What's changed?

* Remove keys
* Stabilize props
* Force reset store on unmount
2022-04-24 13:34:22 +02:00
Braks 4e3f4541a1 chore(nodes): flush watcher on post hook 2022-04-24 13:34:22 +02:00
Braks 8b3acda42e fix(edges): base-edge throwing attrs warnings for curvature 2022-04-21 10:47:53 +02:00
Braks 0a21f3c068 chore(nodes,edges): Remove duplicate keys on nodes/edges 2022-04-21 10:47:53 +02:00
Braks ee38f4af9b fix(edges): Remove orphaned edges
# What's changed?

* Remove source/targetNode properties from GraphEdge type, the source/target will be fetched with getters if necessary
* Remove edges when they have no existing source or target nodes that can be found in the state
* Add nodes to custom edge test
2022-04-21 10:47:53 +02:00
Braks 79ede4cf84 fix(nodes): Recalculate handle bounds on position change 2022-04-13 22:48:23 +02:00
Braks 1e1ee65de7 fix: remove 'Floo' from EdgeText.vue 2022-04-11 18:09:41 +02:00
Braks e17fb8094b chore: remove comment 2022-04-11 16:43:07 +02:00
Braks 440ad3c681 fix(types): node/edge label type
* add Component to label type
2022-04-11 11:30:10 +02:00
Braks 88f808711a feat: Allow node/edge template per element
* Allow templates to be overwritten per element with template option
2022-04-11 11:30:10 +02:00
Braks 2cc387fb2f feat: Add name to BaseEdge.vue 2022-04-11 11:30:10 +02:00
Braks fcdbc21d34 refactor(flow!): Change transform to viewport
* Change array type to object type and rename transform type to viewport
* Update examples & docs
2022-04-11 11:30:10 +02:00
Braks 3838ffc2fb fix(nodes): remove v-if 2022-04-11 11:30:10 +02:00
Braks 3064e287e7 fix(nodes): trigger computedPosition watcher when selected changes
* z-index will not change back if selected does not trigger a change
2022-04-11 11:30:10 +02:00
Braks 8e3fef504c refactor(nodes,edges,types!): Change label-type to string | VNode | Object 2022-04-11 11:30:10 +02:00
Braks 6b76b8be06 refactor(nodes): Add nodeElements prop again
* Remove templateRef and use regular ref (templateRef causes infinite re-renders)
2022-04-11 11:30:10 +02:00
Braks 38b7e0757d fix(nodes): Parenthesis in handleId computed 2022-04-11 11:30:10 +02:00
Braks 8627fef5af fix(nodes): use correct handleId 2022-04-11 11:30:10 +02:00
Braks b206ff160f fix(nodes,edges): Cast styles to css properties 2022-04-11 11:30:10 +02:00
Braks 5f6a805baa refactor(edges): use computed properties for class and styles 2022-04-11 11:30:10 +02:00
Braks 2048423ab0 refactor(nodes): use computed properties for class and styles 2022-04-11 11:30:10 +02:00
Braks 2d7e2a710f fix: replace watchDebounced with debouncedWatch 2022-04-11 11:30:10 +02:00
Braks 1e23893e58 fix: import paths 2022-04-11 11:30:10 +02:00
Braks bc88e18f22 update(edges): Use proper handle bounds 2022-04-11 11:30:10 +02:00
Braks 342d0305a6 refactor(nodes): Replace DraggableCore with composable 2022-04-11 11:30:10 +02:00
Braks 8f2d94ae55 refactor(nodes!): Remove dimensions option, replace with width and height
* Can be used to set width, height (similar to style prop but with easier access)
2022-04-11 11:30:10 +02:00
Braks 4f026e841a refactor(nodes): Remove DraggableCore component and use composable
* Remove node-element prop from NodeProps
2022-04-11 11:30:10 +02:00