mirror of
https://github.com/hexastack/hexabot
synced 2025-06-10 00:16:17 +00:00
fix: seperated files
This commit is contained in:
parent
f9cd6b24db
commit
cfd1f0850d
@ -23,10 +23,8 @@ import {
|
|||||||
} from "@/types/visual-editor.types";
|
} from "@/types/visual-editor.types";
|
||||||
|
|
||||||
import { ZOOM_LEVEL } from "../constants";
|
import { ZOOM_LEVEL } from "../constants";
|
||||||
import {
|
import { AdvancedLinkFactory } from "../v2/AdvancedLink/AdvancedLinkFactory";
|
||||||
AdvancedLinkFactory,
|
import { AdvancedLinkModel } from "../v2/AdvancedLink/AdvancedLinkModel";
|
||||||
AdvancedLinkModel,
|
|
||||||
} from "../v2/AdvancedLink/AdvancedLink";
|
|
||||||
import { CustomCanvasWidget } from "../v2/CustomCanvasWidget";
|
import { CustomCanvasWidget } from "../v2/CustomCanvasWidget";
|
||||||
import { CustomDeleteItemsAction } from "../v2/CustomDiagramNodes/CustomDeleteAction";
|
import { CustomDeleteItemsAction } from "../v2/CustomDiagramNodes/CustomDeleteAction";
|
||||||
import { NodeFactory } from "../v2/CustomDiagramNodes/NodeFactory";
|
import { NodeFactory } from "../v2/CustomDiagramNodes/NodeFactory";
|
||||||
|
@ -2,16 +2,17 @@ import { css, keyframes } from "@emotion/react";
|
|||||||
import styled from "@emotion/styled";
|
import styled from "@emotion/styled";
|
||||||
import {
|
import {
|
||||||
DefaultLinkFactory,
|
DefaultLinkFactory,
|
||||||
DefaultLinkModel,
|
|
||||||
DefaultLinkModelOptions,
|
|
||||||
DefaultLinkWidget,
|
DefaultLinkWidget,
|
||||||
} from "@projectstorm/react-diagrams";
|
} from "@projectstorm/react-diagrams";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import { AdvancedLinkModel } from "./AdvancedLinkModel";
|
||||||
|
|
||||||
interface Point {
|
interface Point {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const createCurvedPath = (start: Point, end: Point) => {
|
const createCurvedPath = (start: Point, end: Point) => {
|
||||||
const controlPoint1X = start.x + 220;
|
const controlPoint1X = start.x + 220;
|
||||||
const controlPoint1Y = start.y - 250;
|
const controlPoint1Y = start.y - 250;
|
||||||
@ -43,15 +44,6 @@ namespace S {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AdvancedLinkModel extends DefaultLinkModel {
|
|
||||||
constructor(options?: DefaultLinkModelOptions) {
|
|
||||||
super({
|
|
||||||
...options,
|
|
||||||
type: "advanced",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class AdvancedLinkFactory extends DefaultLinkFactory {
|
export class AdvancedLinkFactory extends DefaultLinkFactory {
|
||||||
constructor() {
|
constructor() {
|
||||||
super("advanced");
|
super("advanced");
|
@ -0,0 +1,13 @@
|
|||||||
|
import {
|
||||||
|
DefaultLinkModel,
|
||||||
|
DefaultLinkModelOptions,
|
||||||
|
} from "@projectstorm/react-diagrams";
|
||||||
|
|
||||||
|
export class AdvancedLinkModel extends DefaultLinkModel {
|
||||||
|
constructor(options?: DefaultLinkModelOptions) {
|
||||||
|
super({
|
||||||
|
...options,
|
||||||
|
type: "advanced",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -53,7 +53,7 @@ import { IBlock } from "@/types/block.types";
|
|||||||
import { ICategory } from "@/types/category.types";
|
import { ICategory } from "@/types/category.types";
|
||||||
import { BlockPorts } from "@/types/visual-editor.types";
|
import { BlockPorts } from "@/types/visual-editor.types";
|
||||||
|
|
||||||
import { AdvancedLinkModel } from "./AdvancedLink/AdvancedLink";
|
import { AdvancedLinkModel } from "./AdvancedLink/AdvancedLinkModel";
|
||||||
import BlockDialog from "../BlockDialog";
|
import BlockDialog from "../BlockDialog";
|
||||||
import { ZOOM_LEVEL } from "../constants";
|
import { ZOOM_LEVEL } from "../constants";
|
||||||
import { useVisualEditor } from "../hooks/useVisualEditor";
|
import { useVisualEditor } from "../hooks/useVisualEditor";
|
||||||
|
Loading…
Reference in New Issue
Block a user