update(types!): Merge EdgeProps into Edge type
Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
import { CSSProperties } from 'vue'
|
||||
import { getCenter, getMarkerEnd, getBezierPath } from './utils'
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
|
||||
|
||||
interface BezierEdgeProps {
|
||||
interface BezierEdgeProps extends EdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -14,8 +14,8 @@ interface BezierEdgeProps {
|
||||
targetY: number
|
||||
selected?: boolean
|
||||
animated?: boolean
|
||||
sourcePosition?: Position
|
||||
targetPosition?: Position
|
||||
sourcePosition: Position
|
||||
targetPosition: Position
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { getCenter, getMarkerEnd, getSmoothStepPath } from './utils'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
|
||||
|
||||
export interface EdgeSmoothStepProps {
|
||||
interface SmoothStepEdgeProps extends EdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -13,8 +13,8 @@ export interface EdgeSmoothStepProps {
|
||||
targetY: number
|
||||
selected?: boolean
|
||||
animated?: boolean
|
||||
sourcePosition?: Position
|
||||
targetPosition?: Position
|
||||
sourcePosition: Position
|
||||
targetPosition: Position
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
@@ -35,7 +35,7 @@ export interface EdgeSmoothStepProps {
|
||||
targetHandleId?: ElementId | null
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<EdgeSmoothStepProps>(), {
|
||||
const props = withDefaults(defineProps<SmoothStepEdgeProps>(), {
|
||||
selected: false,
|
||||
sourcePosition: Position.Bottom,
|
||||
targetPosition: Position.Top,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import SmoothStepEdge from './SmoothStepEdge.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
|
||||
|
||||
export interface EdgeStepProps {
|
||||
export interface StepEdgeProps extends EdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -12,8 +12,8 @@ export interface EdgeStepProps {
|
||||
targetY: number
|
||||
selected?: boolean
|
||||
animated?: boolean
|
||||
sourcePosition?: Position
|
||||
targetPosition?: Position
|
||||
sourcePosition: Position
|
||||
targetPosition: Position
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
@@ -33,7 +33,7 @@ export interface EdgeStepProps {
|
||||
targetHandleId?: ElementId | null
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<EdgeStepProps>(), {
|
||||
const props = withDefaults(defineProps<StepEdgeProps>(), {
|
||||
selected: false,
|
||||
sourcePosition: Position.Bottom,
|
||||
targetPosition: Position.Top,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { getMarkerEnd, getBezierPath } from './utils'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { ArrowHeadType, EdgeProps, ElementId, Position } from '~/types'
|
||||
|
||||
interface StraightEdgeProps {
|
||||
interface StraightEdgeProps extends EdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -13,8 +13,8 @@ interface StraightEdgeProps {
|
||||
targetY: number
|
||||
selected?: boolean
|
||||
animated?: boolean
|
||||
sourcePosition?: Position
|
||||
targetPosition?: Position
|
||||
sourcePosition: Position
|
||||
targetPosition: Position
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
|
||||
Reference in New Issue
Block a user