Spaces:
Running
Running
rename NodeWithPy3DMol to NodeWithMolecule
Browse files
lynxkite-app/web/src/workspace/Workspace.tsx
CHANGED
@@ -35,8 +35,8 @@ import { LynxKiteState } from "./LynxKiteState";
|
|
35 |
import NodeSearch, { type OpsOp, type Catalog, type Catalogs } from "./NodeSearch.tsx";
|
36 |
import NodeWithGraphCreationView from "./nodes/GraphCreationNode.tsx";
|
37 |
import NodeWithImage from "./nodes/NodeWithImage.tsx";
|
|
|
38 |
import NodeWithParams from "./nodes/NodeWithParams";
|
39 |
-
import NodeWithPy3Dmol from "./nodes/NodeWithPy3DMol.tsx";
|
40 |
import NodeWithTableView from "./nodes/NodeWithTableView.tsx";
|
41 |
import NodeWithVisualization from "./nodes/NodeWithVisualization.tsx";
|
42 |
|
@@ -174,7 +174,7 @@ function LynxKiteFlow() {
|
|
174 |
image: NodeWithImage,
|
175 |
table_view: NodeWithTableView,
|
176 |
graph_creation_view: NodeWithGraphCreationView,
|
177 |
-
|
178 |
}),
|
179 |
[],
|
180 |
);
|
|
|
35 |
import NodeSearch, { type OpsOp, type Catalog, type Catalogs } from "./NodeSearch.tsx";
|
36 |
import NodeWithGraphCreationView from "./nodes/GraphCreationNode.tsx";
|
37 |
import NodeWithImage from "./nodes/NodeWithImage.tsx";
|
38 |
+
import NodeWithMolecule from "./nodes/NodeWithMolecule.tsx";
|
39 |
import NodeWithParams from "./nodes/NodeWithParams";
|
|
|
40 |
import NodeWithTableView from "./nodes/NodeWithTableView.tsx";
|
41 |
import NodeWithVisualization from "./nodes/NodeWithVisualization.tsx";
|
42 |
|
|
|
174 |
image: NodeWithImage,
|
175 |
table_view: NodeWithTableView,
|
176 |
graph_creation_view: NodeWithGraphCreationView,
|
177 |
+
molecule: NodeWithMolecule,
|
178 |
}),
|
179 |
[],
|
180 |
);
|
lynxkite-app/web/src/workspace/nodes/{NodeWithPy3DMol.tsx → NodeWithMolecule.tsx}
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
-
import React, { useEffect } from "react";
|
2 |
import NodeWithParams from "./NodeWithParams";
|
3 |
const $3Dmol = await import("3dmol");
|
4 |
|
5 |
-
const
|
6 |
const containerRef = React.useRef<HTMLDivElement>(null);
|
7 |
const viewerRef = React.useRef<any>(null);
|
8 |
|
@@ -47,8 +47,13 @@ const NodeWithPy3Dmol = (props: any) => {
|
|
47 |
};
|
48 |
}, [props.data?.display?.value]);
|
49 |
|
50 |
-
const nodeStyle = {
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
52 |
flex: 1,
|
53 |
minHeight: "300px",
|
54 |
border: "1px solid #ddd",
|
@@ -64,4 +69,4 @@ const NodeWithPy3Dmol = (props: any) => {
|
|
64 |
);
|
65 |
};
|
66 |
|
67 |
-
export default
|
|
|
1 |
+
import React, { useEffect, type CSSProperties } from "react";
|
2 |
import NodeWithParams from "./NodeWithParams";
|
3 |
const $3Dmol = await import("3dmol");
|
4 |
|
5 |
+
const NodeWithMolecule = (props: any) => {
|
6 |
const containerRef = React.useRef<HTMLDivElement>(null);
|
7 |
const viewerRef = React.useRef<any>(null);
|
8 |
|
|
|
47 |
};
|
48 |
}, [props.data?.display?.value]);
|
49 |
|
50 |
+
const nodeStyle: CSSProperties = {
|
51 |
+
display: "flex",
|
52 |
+
flexDirection: "column",
|
53 |
+
height: "100%",
|
54 |
+
};
|
55 |
+
|
56 |
+
const vizStyle: CSSProperties = {
|
57 |
flex: 1,
|
58 |
minHeight: "300px",
|
59 |
border: "1px solid #ddd",
|
|
|
69 |
);
|
70 |
};
|
71 |
|
72 |
+
export default NodeWithMolecule;
|
lynxkite-core/src/lynxkite/core/ops.py
CHANGED
@@ -180,7 +180,7 @@ class Op(BaseConfig):
|
|
180 |
"table_view",
|
181 |
"graph_creation_view",
|
182 |
"image",
|
183 |
-
"
|
184 |
]:
|
185 |
# If the operation is some kind of visualization, we use the output as the
|
186 |
# value to display by default.
|
|
|
180 |
"table_view",
|
181 |
"graph_creation_view",
|
182 |
"image",
|
183 |
+
"molecule",
|
184 |
]:
|
185 |
# If the operation is some kind of visualization, we use the output as the
|
186 |
# value to display by default.
|