Skip to content

Commit

Permalink
Fix issues with graphs not showing up (#998)
Browse files Browse the repository at this point in the history
The graphs were not showing up due to an issue with the global min width
not being defined properly.
Also fixed an issue with the viewfinder being too thin if the minimap
was less than a screen wide.
  • Loading branch information
Joeytje50 authored Jul 13, 2023
1 parent cb656f7 commit 1e625f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions activity_browser/static/javascript/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ function getWindowSize() {

globalWidth = x;
globalHeight = y;
if (!globalMinWidth) {
globalMinWidth = globalWidth * 0.99;
}
return {x,y};
};

Expand Down Expand Up @@ -242,7 +245,6 @@ d3.demo.canvas = function() {
// get panCanvas width here?
// pan to node (implement here)
minimap.render();

updateDimensions(minimap.width());
canvas.render();
canvas.reset();
Expand Down Expand Up @@ -421,7 +423,7 @@ d3.demo.minimap = function() {
d3.select(node).attr("transform", "translate(0,0)");
// keep the minimap's viewport (frame) sized to match the current visualization viewport dimensions
frame.select(".background")
.attr("width", minimap.width())
.attr("width", Math.max(minimap.width(), globalWidth))
.attr("height", height);
frame.node().parentNode.appendChild(frame.node());
};
Expand Down

0 comments on commit 1e625f7

Please sign in to comment.