update!: graphnode and node typing

* graphnode is a node containing internal Vue Flow data
* move util files to util directory
* move flow actions type into store file
* rename panel type file to zoom
* rename types file to flow
* Rename Node to NodeWrapper
* Rename Edge to EdgeWrapper

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-21 16:25:27 +01:00
parent ba24f3ca62
commit 062aee45b2
36 changed files with 280 additions and 275 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ const onLoad = (flowInstance: FlowInstance) => {
}
const updatePos = () => {
elements.value = elements.value.map((el: FlowElement) => {
elements.value = elements.value.map((el) => {
if (isNode(el)) {
el.position = {
x: Math.random() * 400,
@@ -50,7 +50,7 @@ const logToObject = () => console.log(rfInstance.value?.toObject())
const resetTransform = () => rfInstance.value?.setTransform({ x: 0, y: 0, zoom: 1 })
const toggleclasss = () => {
elements.value = elements.value.map((el: FlowElement) => {
elements.value = elements.value.map((el) => {
if (isNode(el)) el.class = el.class === 'light' ? 'dark' : 'light'
return el
})