update(docs): fix view height
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
MiniMap,
|
||||
Controls,
|
||||
Background,
|
||||
@@ -26,12 +27,9 @@ const elements = ref<Elements>([
|
||||
])
|
||||
const rfInstance = ref<FlowInstance | null>(null)
|
||||
const onElementsRemove = (elementsToRemove: Elements) => (elements.value = removeElements(elementsToRemove, elements.value))
|
||||
const onConnect = (params: Edge | Connection) => {
|
||||
elements.value = addEdge(params, elements.value)
|
||||
console.log(params)
|
||||
}
|
||||
const onConnect = (params: Edge | Connection) => (elements.value = addEdge(params, elements.value))
|
||||
const onLoad = (flowInstance: FlowInstance) => {
|
||||
flowInstance.fitView({ padding: 0.1 })
|
||||
flowInstance?.fitView({ padding: 0.1 })
|
||||
rfInstance.value = flowInstance
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
addEdge,
|
||||
Background,
|
||||
Connection,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, { removeElements, addEdge, Background, BackgroundVariant, Elements, Connection, Edge } from '@braks/vue-flow'
|
||||
import { Flow, removeElements, addEdge, Background, BackgroundVariant, Elements, Connection, Edge } from '@braks/vue-flow'
|
||||
import CustomConnectionLine from '../../components/CustomConnectionLine.vue'
|
||||
|
||||
const elements = ref<Elements>([
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
isEdge,
|
||||
removeElements,
|
||||
addEdge,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
addEdge,
|
||||
removeElements,
|
||||
Controls,
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
/**
|
||||
* Example for checking the different edge types and source and target positions
|
||||
*/
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
removeElements,
|
||||
addEdge,
|
||||
MiniMap,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
MiniMap,
|
||||
Controls,
|
||||
Background,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
MiniMap,
|
||||
Controls,
|
||||
Background,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, { MiniMap, Controls, Connection, Edge, Elements, addEdge } from '@braks/vue-flow'
|
||||
import { Flow, MiniMap, Controls, Connection, Edge, Elements, addEdge } from '@braks/vue-flow'
|
||||
|
||||
const initialElements: Elements = [
|
||||
{ id: '1', type: 'input', data: { label: 'Node 1' }, position: { x: 250, y: 5 } },
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
removeElements,
|
||||
addEdge,
|
||||
MiniMap,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
addEdge,
|
||||
MiniMap,
|
||||
Controls,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import dagre from 'dagre'
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
Controls,
|
||||
addEdge,
|
||||
ConnectionMode,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, { addEdge, Connection, Edge, Elements, isEdge, FlowInstance, Position } from '@braks/vue-flow'
|
||||
import { Flow, addEdge, Connection, Edge, Elements, isEdge, FlowInstance, Position } from '@braks/vue-flow'
|
||||
|
||||
const initialElements: Elements = [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, { Elements, Position, NodeType, Connection, Edge, addEdge } from '@braks/vue-flow'
|
||||
import { Flow, Elements, Position, NodeType, Connection, Edge, addEdge } from '@braks/vue-flow'
|
||||
import NodeA from '../../components/NodeA.vue'
|
||||
import NodeB from '../../components/NodeB.vue'
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
addEdge,
|
||||
removeElements,
|
||||
Controls,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, { addEdge, Connection, Node, Edge, Elements, FlowInstance, removeElements } from '@braks/vue-flow'
|
||||
import { Flow, addEdge, Connection, Node, Edge, Elements, FlowInstance, removeElements } from '@braks/vue-flow'
|
||||
import Controls from '../../components/SaveControls.vue'
|
||||
|
||||
const initialElements: Elements = [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
removeElements,
|
||||
addEdge,
|
||||
MiniMap,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, { removeElements, addEdge, Node, FlowElement, Elements, Connection, Edge } from '@braks/vue-flow'
|
||||
import { Flow, removeElements, addEdge, Node, FlowElement, Elements, Connection, Edge } from '@braks/vue-flow'
|
||||
|
||||
const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node)
|
||||
const onElementClick = (_: MouseEvent, element: FlowElement) => console.log('click', element)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
NodeType,
|
||||
addEdge,
|
||||
useZoomPanHelper,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
Controls,
|
||||
updateEdge,
|
||||
addEdge,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
NodeType,
|
||||
addEdge,
|
||||
useZoomPanHelper,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, { Elements } from '@braks/vue-flow'
|
||||
import { Flow, Elements } from '@braks/vue-flow'
|
||||
|
||||
const initialElements: Elements = [
|
||||
{ id: '1', data: { label: '-' }, position: { x: 100, y: 100 } },
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
addEdge,
|
||||
Handle,
|
||||
Connection,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Flow, {
|
||||
import {
|
||||
Flow,
|
||||
removeElements,
|
||||
addEdge,
|
||||
Background,
|
||||
|
||||
Reference in New Issue
Block a user