Skip to content

Commit

Permalink
refactor: Reduce network visualization and graph size by 30%
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Nov 27, 2024
1 parent 1c8e968 commit 9a0b3b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions hugo-site/layouts/shortcodes/small-world-scale.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</button>
</div>
<div style="display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1rem;">
<canvas id="networkCanvas3" width="500" height="500" style="width: 500px; height: 500px;"></canvas>
<div id="scalingChart" style="width: 500px; height: 500px;">
<svg width="500" height="500"></svg>
<canvas id="networkCanvas3" width="350" height="350" style="width: 350px; height: 350px;"></canvas>
<div id="scalingChart" style="width: 350px; height: 350px;">
<svg width="350" height="350"></svg>
</div>
</div>
<div style="margin-bottom: 2rem;"></div>
Expand Down
4 changes: 2 additions & 2 deletions hugo-site/static/js/small-world-scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function waitForD3() {
waitForD3().then(() => {
const canvas = document.getElementById('networkCanvas3');
const ctx = canvas.getContext('2d');
const width = canvas.width;
const height = canvas.height;
const width = 350;
const height = 350;

// Parameters
let numPeers = 3;
Expand Down

0 comments on commit 9a0b3b4

Please sign in to comment.