fix: minimap prop type missing

* cant import stringfunc type (string literal and all...)

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-21 18:19:43 +01:00
parent c48a0a9e2a
commit a67e6c4430
2 changed files with 4 additions and 3 deletions
@@ -1,9 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ShapeRendering, StringFunc } from '../../types' import { GraphNode, ShapeRendering } from '../../types'
import { useStore, useWindow } from '../../composables' import { useStore, useWindow } from '../../composables'
import { getBoundsofRects, getRectOfNodes } from '../../utils' import { getBoundsofRects, getRectOfNodes } from '../../utils'
import MiniMapNode from './MiniMapNode.vue' import MiniMapNode from './MiniMapNode.vue'
type StringFunc = (node: GraphNode) => string
interface MiniMapProps { interface MiniMapProps {
nodeColor?: string | StringFunc nodeColor?: string | StringFunc
nodeStrokeColor?: string | StringFunc nodeStrokeColor?: string | StringFunc
+2 -2
View File
@@ -36,7 +36,7 @@ export interface ControlEvents {
export type StringFunc = (node: Node) => string export type StringFunc = (node: Node) => string
export type ShapeRendering = 'inherit' | 'auto' | 'geometricPrecision' | 'optimizeSpeed' | 'crispEdges' | undefined export type ShapeRendering = 'inherit' | 'auto' | 'geometricPrecision' | 'optimizeSpeed' | 'crispEdges' | undefined
interface MiniMapProps { export interface MiniMapProps {
nodeColor?: string | StringFunc nodeColor?: string | StringFunc
nodeStrokeColor?: string | StringFunc nodeStrokeColor?: string | StringFunc
nodeClassName?: string | StringFunc nodeClassName?: string | StringFunc
@@ -45,7 +45,7 @@ interface MiniMapProps {
maskColor?: string maskColor?: string
} }
interface MiniMapNodeProps { export interface MiniMapNodeProps {
x?: number x?: number
y?: number y?: number
width?: number width?: number