Skip to content

Commit

Permalink
add GENERATE_SOURCEMAP to solve x6 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
codebdy committed Jan 16, 2023
1 parent f9b1195 commit 8ca193b
Show file tree
Hide file tree
Showing 5 changed files with 574 additions and 514 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GENERATE_SOURCEMAP=false
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export function useAddNodes(graph?: Graph) {
if (graph) {
const cells: Cell[] = []
data.forEach((item) => {
console.log("哈哈2", item)
if (item.shape === 'dag-node') {
cells.push(graph.createNode(item))
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { register } from '@antv/x6-react-shape'
import { Selection } from '@antv/x6-plugin-selection'

const SytledContent = styled.div`
height: calc(100vh - 100px);
height: calc(100vh - 160px);
display: flex;
border: solid 1px;
`
Expand All @@ -37,7 +37,7 @@ const Toolbar = styled.div`
`

const CanvasContainer = styled.div`
flex: 1
flex: 1;
`

const PropertyBox = styled.div`
Expand Down Expand Up @@ -208,7 +208,9 @@ export const PipeEditor = memo(() => {
return (
<SytledContent style={{ borderColor: token.colorBorder }}>
<LeftArea style={{ borderColor: token.colorBorder }}>
left
<p>
方法
</p>
</LeftArea>
<CenterArea>
<Toolbar style={{ borderColor: token.colorBorder }}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Button, Modal } from "antd"
import { useToolsTranslate } from "core-react/hooks/useToolsTranslate";
import { memo, useCallback, useEffect, useState } from "react"
import { PipeEditor } from "./PipeEditor";

Expand All @@ -9,6 +10,7 @@ export const FunctionsInput = memo((props: {
}) => {
const { title, ...other } = props;
const [isModalOpen, setIsModalOpen] = useState(false);
const t = useToolsTranslate()

const showModal = useCallback(() => {
setIsModalOpen(true);
Expand All @@ -28,7 +30,8 @@ export const FunctionsInput = memo((props: {
<Modal
title={title}
open={isModalOpen}
footer={false}
cancelText={t("cancel")}
okText = {t("confirm")}
onCancel={handleCancel}
width={"calc(100vw - 40px)"}
centered
Expand Down
Loading

0 comments on commit 8ca193b

Please sign in to comment.