diff --git a/src/js/portfolio.js b/src/js/portfolio.js index 2ed2ba4..fdb7c19 100644 --- a/src/js/portfolio.js +++ b/src/js/portfolio.js @@ -650,7 +650,10 @@ node.append('circle') .attr("r", nodeSize) .attr("class", "nodeBg") ; - +node.append('circle') + .attr("r", nodeSize * 1.08) // nodeSize + margin + .attr("class", "highlightCircle") + ; node.append('text') .append("textPath") @@ -658,28 +661,17 @@ node.append('text') .text(getNodeTitle); node.each(function(d) { - let n = d3.select(this); if(!d.contentUrl) { - n.append('circle') - .attr("r", nodeSize * 1.08) // nodeSize + margin - .attr("class", "highlightCircle") - ; - } else { - n.append('svg:image') - .attr("xlink:href", d.contentUrl) - .attr("width", nodeSize*2) - .attr("height", nodeSize*2) - .attr("transform","translate(-"+nodeSize+" -"+nodeSize+")") - // .attr("clip-path","url(#clipNodeImage)") - .attr("preserveAspectRatio","xMidYMid slice") - ; - n.append('rect') - .attr("width", nodeSize * 1.08 * 2) // nodeSize + margin - .attr("height", nodeSize * 1.08 * 2) // nodeSize + margin - .attr("transform","translate(-"+nodeSize * 1.08 +" -"+nodeSize * 1.08 +")") - .attr("class", "highlightCircle") - ; + return; } + d3.select(this).append('svg:image') + .attr("xlink:href", d.contentUrl) + .attr("width", nodeSize*2) + .attr("height", nodeSize*2) + .attr("transform","translate(-"+nodeSize+" -"+nodeSize+")") + .attr("clip-path","url(#clipNodeImage)") + .attr("preserveAspectRatio","xMidYMid slice") + ; }); // node.append("title")