Skip to content

Commit

Permalink
Merge pull request #357 from /issues/354
Browse files Browse the repository at this point in the history
Update topicprint.js to solve Issue #354
  • Loading branch information
JaimieMurdock authored Apr 29, 2020
2 parents d7378e9 + 43e2eca commit 446e270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion www/topicprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,9 @@ if (url)
var foreignObject = document.createElementNS(ns, 'foreignObject');
foreignObject.setAttribute("width", 140);
foreignObject.setAttribute("height", 140);
foreignObject.setAttribute("transform", "translate(20, " + (((d3.keys(topics).length / 2) + 1) * 20 + 65) + ")");
var topicLength = d3.keys(topics).length;
var legendCols = Math.max(Math.ceil(d3.keys(topics).length / Math.min(data.length, maxRows)), minCols);
foreignObject.setAttribute("transform", "translate(20, " + (((topicLength / legendCols) + 1) * 20 + 65) + ")");
var div = document.createElement('div');
div.innerHTML = '<Strong>Display Options</strong>';
var label = document.createElement('label');
Expand Down

0 comments on commit 446e270

Please sign in to comment.