Skip to content

Commit

Permalink
fix: fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 12, 2021
1 parent 4368459 commit 90e2153
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#circle-packing text,
#branch-timeline svg,
#members-lifecycle svg,
.menuEntry rect,
.tooltip {
font: 12px sans-serif;
line-height: 20px;
Expand Down
4 changes: 1 addition & 3 deletions web/public/js/graph/cloc/circle-packing.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function renderPacking(originData) {
.sort((a, b) => b.value - a.value))
}

let width = GraphConfig.height;
let width = GraphConfig.width;
let height = width;

let color = d3.scaleLinear()
Expand All @@ -39,7 +39,6 @@ function renderPacking(originData) {
.attr("viewBox", `-${width / 2} -${height / 2} ${width} ${height}`);

svg.style("display", "block")
.style("margin", "0 -14px")
.style("background", color(0))
.style("cursor", "pointer")
.attr("text-anchor", "middle")
Expand All @@ -59,7 +58,6 @@ function renderPacking(originData) {
})
.on("click", (event, d) => focus !== d && (zoom(d), event.stopPropagation()))
.on("contextmenu", (event, d) => {
console.log(event, d);
MenuSupport.createContextMenu(event, d, MenuSupport.defaultMenuItems, svg, {
width: -width / 2,
height: -height / 2
Expand Down
3 changes: 2 additions & 1 deletion web/public/js/support/menu-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ let MenuSupport = {
})
.selectAll('tmp')
.data(menuItems).enter()
.append('g').attr('class', "menuEntry")
.append('g')
.attr('class', "menuEntry")
.style({'cursor': 'pointer'});

// Draw menu entries
Expand Down

0 comments on commit 90e2153

Please sign in to comment.