Skip to content

Commit 869586a

Browse files
adamnschFlorentinD
andcommitted
Fix rendering issues
Co-Authored-By: Florentin Dörre <[email protected]>
1 parent 2dfed66 commit 869586a

File tree

8 files changed

+1442
-112
lines changed

8 files changed

+1442
-112
lines changed

docs/extra/.ipynb_checkpoints/getting-started-checkpoint.ipynb

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

docs/extra/getting-started.ipynb

Lines changed: 184 additions & 16 deletions
Large diffs are not rendered by default.

examples/gds-example.ipynb

Lines changed: 576 additions & 54 deletions
Large diffs are not rendered by default.

examples/neo4j-example.ipynb

Lines changed: 192 additions & 18 deletions
Large diffs are not rendered by default.

examples/snowpark-example.ipynb

Lines changed: 96 additions & 9 deletions
Large diffs are not rendered by default.

python-wrapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.egg-info
22
__pycache__
33
build
4+
dist
45

56
# Should we ignore the following?
67
src/neo4j_viz/resources/nvl_entrypoint/*

python-wrapper/src/neo4j_viz/nvl.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def render(
6868

6969
if show_hover_tooltip:
7070
hover_element = f"document.getElementById('{container_id}-tooltip')"
71-
hover_div = f'<div id="{container_id}-tooltip" class="tooltip" style="display: none;"/>'
71+
hover_div = f'<div id="{container_id}-tooltip" class="tooltip" style="display: none;"></div>'
7272
else:
7373
hover_element = "null"
7474
hover_div = ""
@@ -94,18 +94,18 @@ def render(
9494
<style>
9595
{self.styles}
9696
</style>
97-
<div style="position: absolute; z-index: 2147483647; right: 0; top: 0; padding: 1rem">
98-
<button type="button" title="Save as PNG" onclick="{nvl_varname}.nvl.saveToFile({{ filename: '{download_name}' }})" class="icon">
99-
{self.screenshot_svg}
100-
</button>
101-
<button type="button" title="Zoom in" onclick="{nvl_varname}.nvl.setZoom({nvl_varname}.nvl.getScale() + 0.5)" class="icon">
102-
{self.zoom_in_svg}
103-
</button>
104-
<button type="button" title="Zoom out" onclick="{nvl_varname}.nvl.setZoom({nvl_varname}.nvl.getScale() - 0.5)" class="icon">
105-
{self.zoom_out_svg}
106-
</button>
107-
</div>
10897
<div id="{container_id}" style="width: {width}; height: {height}; position: relative;">
98+
<div style="position: absolute; z-index: 2147483647; right: 0; top: 0; padding: 1rem">
99+
<button type="button" title="Save as PNG" onclick="{nvl_varname}.nvl.saveToFile({{ filename: '{download_name}' }})" class="icon">
100+
{self.screenshot_svg}
101+
</button>
102+
<button type="button" title="Zoom in" onclick="{nvl_varname}.nvl.setZoom({nvl_varname}.nvl.getScale() + 0.5)" class="icon">
103+
{self.zoom_in_svg}
104+
</button>
105+
<button type="button" title="Zoom out" onclick="{nvl_varname}.nvl.setZoom({nvl_varname}.nvl.getScale() - 0.5)" class="icon">
106+
{self.zoom_out_svg}
107+
</button>
108+
</div>
109109
{hover_div}
110110
</div>
111111

python-wrapper/src/neo4j_viz/resources/nvl_entrypoint/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
button.icon {
1717
stroke: var(--stroke);
1818
background-color: inherit;
19-
padding: .4rem .41rem .19rem 0.41rem;
19+
padding: 10px 10px 5px 10px;
2020
border: 1.3px solid #bcbcbc;
2121
border-radius: 10px;
2222
}
@@ -38,7 +38,7 @@ button.icon:active {
3838
z-index: 2147483647;
3939
right: 0;
4040
bottom: 0;
41-
background:inherit;
41+
background-color:var(--button-hover-bg-color);
4242
border: solid;
4343
border-color: #BBBEC3;
4444
border-width: 0.5px;
@@ -47,7 +47,7 @@ button.icon:active {
4747
margin-bottom: 1rem;
4848
margin-right: 0.5rem;
4949
filter: drop-shadow(0 4px 8px rgba(26,27,29,0.12));
50-
font-family: PublicSans;
50+
font-family: 'Public Sans', sans-serif;
5151
color: var(--neutral-text-default);
5252
font-size: 14px
5353
}

0 commit comments

Comments
 (0)