refactor(types)!: Remove elements and replace with nodes and edges

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent f28e10b05a
commit b80341467b
17 changed files with 153 additions and 255 deletions
@@ -93,10 +93,8 @@ export default {
>
<template v-for="node of store.getNodes" :key="`mini-map-node-${node.id}`">
<slot
:x="node.computedPosition.x"
:y="node.computedPosition.y"
:width="node.width"
:height="node.height"
:position="node.computedPosition"
:dimensions="node.dimensions"
:style="node.style"
:class="nodeClassNameFunc(node)"
:color="nodeColorFunc(node)"
@@ -106,10 +104,8 @@ export default {
:shape-rendering="shapeRendering"
>
<MiniMapNode
:x="node.computedPosition.x"
:y="node.computedPosition.y"
:width="node.width"
:height="node.height"
:position="node.computedPosition"
:dimensions="node.dimensions"
:style="node.style"
:class="nodeClassNameFunc(node)"
:color="nodeColorFunc(node)"
@@ -1,17 +1,6 @@
<script lang="ts" setup>
import { CSSProperties } from 'vue'
interface MiniMapNodeProps {
x?: number
y?: number
width?: number
height?: number
borderRadius?: number
color?: string
shapeRendering?: CSSProperties['shapeRendering']
strokeColor?: string
strokeWidth?: number
}
import type { MiniMapNodeProps } from '../../types/components'
const props = withDefaults(defineProps<MiniMapNodeProps>(), {
shapeRendering: 'geometricPrecision',
@@ -29,12 +18,12 @@ export default {
<template>
<rect
class="vue-flow__minimap-node"
:x="props.x"
:y="props.y"
:x="props.position.x"
:y="props.position.y"
:rx="props.borderRadius"
:ry="props.borderRadius"
:width="props.width"
:height="props.height"
:width="props.dimensions.width"
:height="props.dimensions.height"
:fill="fill"
:stroke="props.strokeColor"
:stroke-width="props.strokeWidth"