Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nevalla committed Sep 20, 2021
2 parents 43aec60 + f2bc30d commit 46d7dc7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion components/KubeForceChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,13 +603,14 @@ export class KubeForceChart extends React.Component<KubeForceChartProps, State>
const theme = Renderer.Theme.getActiveTheme();

const { id, width, height } = this.props;
const sidebarWidth = (document.querySelectorAll('[data-testid="cluster-sidebar"]')[0] as HTMLElement)?.offsetWidth || 200;
return (
<div id={id} className="KubeForceChart">
<div id="KubeForceChart-tooltip"/>
<ForceGraph2D
graphData={this.state.data}
ref={this.chartRef}
width={width || window.innerWidth - 70 - document.getElementsByClassName("sidebar-nav")[0].clientWidth }
width={width || window.innerWidth - 70 - sidebarWidth }
height={height || window.innerHeight}
autoPauseRedraw={false}
linkWidth={link => this.state.highlightLinks.has(link) ? 2 : 1}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@nevalla/kube-resource-map",
"version": "1.0.0",
"version": "1.0.1",
"description": "Lens extension to visualize Kubernetes resources and their relations",
"homepage": "https://github.com/nevalla/lens-resource-map-extension",
"license": "MIT",
"publisher": "Lauri Nevala",
"renderer": "dist/renderer.js",
"engines": {
"node": ">=12.0 <13.0",
"node": ">=12.0",
"lens": "^5.0.0-beta.7"
},
"keywords": [
Expand Down

0 comments on commit 46d7dc7

Please sign in to comment.