refactor(core,additional-components): move panel component to core pkg
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { useVueFlow } from '@vue-flow/core'
|
||||
import type { PanelPosition } from '../panel'
|
||||
import { Panel } from '../panel'
|
||||
import { Panel, useVueFlow } from '@vue-flow/core'
|
||||
import type { PanelPosition } from '@vue-flow/core'
|
||||
import type { ControlProps } from './types'
|
||||
import ControlButton from './ControlButton.vue'
|
||||
import PlusIcon from './icons/plus.svg'
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import type { CoordinateExtent, GraphNode } from '@vue-flow/core'
|
||||
import { getBoundsofRects, getConnectedEdges, getRectOfNodes, useVueFlow } from '@vue-flow/core'
|
||||
import type { CoordinateExtent, GraphNode, PanelPosition } from '@vue-flow/core'
|
||||
import { Panel, getBoundsofRects, getConnectedEdges, getRectOfNodes, useVueFlow } from '@vue-flow/core'
|
||||
import { zoom, zoomIdentity } from 'd3-zoom'
|
||||
import type { D3ZoomEvent } from 'd3-zoom'
|
||||
import { pointer, select } from 'd3-selection'
|
||||
import type { PanelPosition } from '../panel'
|
||||
import { Panel } from '../panel'
|
||||
import type { MiniMapNodeFunc, MiniMapProps, ShapeRendering } from './types'
|
||||
import MiniMapNode from './MiniMapNode'
|
||||
import { MiniMapSlots } from './types'
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { useVueFlow } from '@vue-flow/core'
|
||||
import type { PanelProps } from './types'
|
||||
|
||||
const props = defineProps<PanelProps>()
|
||||
|
||||
const { userSelectionActive } = useVueFlow()
|
||||
const positionClasses = computed(() => `${props.position}`.split('-'))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="vue-flow__panel" :class="positionClasses" :style="{ pointerEvents: userSelectionActive ? 'none' : 'all' }">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,2 +0,0 @@
|
||||
export { default as Panel } from './Panel.vue'
|
||||
export * from './types'
|
||||
@@ -1,12 +0,0 @@
|
||||
export enum PanelPosition {
|
||||
TopLeft = 'top-left',
|
||||
TopCenter = 'top-center',
|
||||
TopRight = 'top-right',
|
||||
BottomLeft = 'bottom-left',
|
||||
BottomCenter = 'bottom-center',
|
||||
BottomRight = 'bottom-right',
|
||||
}
|
||||
|
||||
export interface PanelProps {
|
||||
position: PanelPosition
|
||||
}
|
||||
Reference in New Issue
Block a user