Braks
f35167ca72
fix: enforce extent on viewport transforms
2022-04-21 10:47:53 +02:00
Braks
86c72ab08a
fix: clamp zoom pan helper transformations
...
# What's changed?
* Clamp x, y positions before applying transformations so we can't position the d3container outside the permissable translate extent
2022-04-14 17:19:30 +02:00
Braks
2d43806523
feat: Extend ValidConnectionFunc
...
# What's changed?
* Add current edges, sourceNode & targetNode as parameter to valid connection func, so we can possibly prevent new connections based on current elements
2022-04-13 22:48:23 +02:00
Braks
2eacdc9830
feat: Extend minimap node type
2022-04-13 22:48:23 +02:00
Braks
e178a3ce44
feat: Add mini map node events
...
# What's changed?
* Add events for mini map node click & dbl click
* Receives event + node as parameters
2022-04-13 22:48:23 +02:00
Braks
567ce96640
feat: MiniMapNode slot
...
# What's changed?
* Add a slot to minimap nodes to allow customizing the node content
* slots receive current node position and dimensions to position elements and selected + dragging params
2022-04-13 22:48:23 +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
367c7fdf40
chore: Remove export
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
ca2a72c3a8
fix: remove waiting for node dimensions in transformation pane
...
* Fixes node dimensions having 0 values when paneReady is fired
2022-04-11 11:30:10 +02:00
Braks
c0c67c6ee6
fix(viewport): await dimensions before using zoompan utils
2022-04-11 11:30:10 +02:00
Braks
e14cf124ff
fix(viewport): emit paneReady when dimensions are ready
...
* Wait for viewport & nodes to have their dimensions established before emitting paneReady
* Avoids getting 0 values for dimensions on paneReady
2022-04-11 11:30:10 +02:00
Braks
f011ea61b1
chore: Remove unused eslint-rules & lint files
2022-04-11 11:30:10 +02:00
Braks
aae37a5416
feat(flow): Allow add and set actions to have a setter input
2022-04-11 11:30:10 +02:00
Braks
ea69dc58ee
fix: Return empty arrays if pane isn't ready yet
2022-04-11 11:30:10 +02:00
Braks
636598ba1a
update(types): Typeguard input type
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
553355dd86
chore: remove log
2022-04-11 11:30:10 +02:00
Braks
30d66a6e29
refactor: transformation-pane class renamed to transformationpane
2022-04-11 11:30:10 +02:00
Braks
3d67d29347
refactor: Change zoom pane into viewport
...
* split zoom pane into smaller components as viewport
* rename UseZoomPanHelper Type to Viewport
2022-04-11 11:30:10 +02:00
Braks
3838ffc2fb
fix(nodes): remove v-if
2022-04-11 11:30:10 +02:00
Braks
365a8a80fa
update(types): default nodrag/nowheel/nopan class as type
2022-04-11 11:30:10 +02:00
Braks
8fbb1cf505
update(types): Connection target and source as non-nullable strings
...
* Required for a valid edge, so it should be required in a connection as well
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
817f69ccb5
update(nodes): NodeProps comments
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
c964fb6b7d
refactor(nodes): Remove position func
...
* it's not improving on existing methods, i.e. no real benefit to it
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
c6b8aa88ea
chore: import sort
2022-04-11 11:30:10 +02:00
Braks
106d2879ce
update(types): Allow void return for styles/class func
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
8c2227132f
fix(flow): await until d3zoom is rdy
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
60feb5d661
refactor(flow!): Remove paneReady state value
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
59870a3a55
chore(deps): update deps
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
1e9cbc0643
feat(nodes): Add PositionFunc as node position type
...
* Allows position to be set relative to another node
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
Braks
fdde631f70
refactor(edges): Remove width/height attribute
2022-04-11 11:30:10 +02:00