Skip to content

Commit 63999ef

Browse files
committed
Dependency: Smaller panel, in center
1 parent a7fee25 commit 63999ef

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<svg width="1920" height="1280"></svg>
1+
<svg width="100%" height="100%" viewBox="-500 -150 1000 300"></svg>

src/app/component/dependency-graph/dependency-graph.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ export class DependencyGraphComponent implements OnInit {
8888
}
8989

9090
generateGraph(activityName: string): void {
91-
let svg = d3.select('svg'),
92-
width = +svg.attr('width'),
93-
height = +svg.attr('height');
91+
let svg = d3.select('svg');
9492

9593
this.simulation = d3
9694
.forceSimulation()
@@ -101,7 +99,7 @@ export class DependencyGraphComponent implements OnInit {
10199
})
102100
)
103101
.force('charge', d3.forceManyBody().strength(-12000))
104-
.force('center', d3.forceCenter(width / 2, height / 2));
102+
.force('center', d3.forceCenter(0, 0));
105103

106104
svg
107105
.append('defs')

0 commit comments

Comments
 (0)