Skip to content

Commit a0cdaee

Browse files
authored
Merge pull request #308 from neo4j/change-default-selection
change default selection
2 parents 66d0cb0 + 803262e commit a0cdaee

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

examples/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.ipynb_checkpoints
22
__marimo__
33
out/*
4-
4+
__pycache__

js-applet/src/graph-widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function GraphWidget() {
112112
const [height] = useModelState<WidgetData["height"]>("height");
113113
const [width] = useModelState<WidgetData["width"]>("width");
114114
const [theme] = useModelState<WidgetData["theme"]>("theme");
115-
const [gesture, setGesture] = useState<Gesture>("box");
115+
const [gesture, setGesture] = useState<Gesture>("single");
116116
const { layout, nvlOptions, zoom, pan, layoutOptions, showLayoutButton } =
117117
options ?? {};
118118
const setLayout = (layout: Layout) => {

python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82239,7 +82239,7 @@ function Ydr(o) {
8223982239
}
8224082240
}
8224182241
function Xdr() {
82242-
const [o] = Y0("nodes"), [r] = Y0("relationships"), [e, t] = Y0("options"), [n] = Y0("height"), [a] = Y0("width"), [i] = Y0("theme"), [c, l] = kr.useState("box"), { layout: d, nvlOptions: s, zoom: u, pan: g, layoutOptions: b, showLayoutButton: f } = e ?? {}, v = (I) => {
82242+
const [o] = Y0("nodes"), [r] = Y0("relationships"), [e, t] = Y0("options"), [n] = Y0("height"), [a] = Y0("width"), [i] = Y0("theme"), [c, l] = kr.useState("single"), { layout: d, nvlOptions: s, zoom: u, pan: g, layoutOptions: b, showLayoutButton: f } = e ?? {}, v = (I) => {
8224382243
t({ ...e, layout: I });
8224482244
}, p = kr.useRef(null), m = Wdr(i ?? "auto"), [y, k] = kr.useState(null);
8224582245
kr.useEffect(() => {

python-wrapper/src/neo4j_viz/widget.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def from_graph_data(
8484
theme=theme,
8585
)
8686

87+
def __str__(self) -> str:
88+
return f"GraphWidget(nodes={len(self.nodes)}, relationships={len(self.relationships)}, options={self.options}, theme={self.theme}, width={self.width}, height={self.height})"
89+
8790
def add_data(
8891
self, nodes: Node | list[Node] | None = None, relationships: Relationship | list[Relationship] | None = None
8992
) -> None:

0 commit comments

Comments
 (0)