-
PatrickJune 24, 2018 at 1:45 pm #11120
At about line 60 in WeightedtreeTest.html, a menu for adjusting the size of the display is set in part with this:
`<ul class=”options” callback=”changeSize”>
<li id=”currentDisplay” class=”selected”><a></a></li>
<li item_value=”1990,800″><a>1990px – 800px</a></li>
<li item_value=”2271,1250″><a>2271px – 1250px</a></li>
<li item_value=”800,600″><a>800px – 600px</a></li>
<li item_value=”375,667″><a>375px – 667px</a></li>
</ul>`
By default the"currentDisplay"
is used. How do I set a different one by default, say 1990px – 800px. (To save the effort of clicking on the desired menu?) I can easily know what thecurrentDisplay
is but I can’t find what sets it.TIA
vizulyJune 25, 2018 at 11:00 am #11123Hello Patrick,
Thank you for the question.
You can find the code that sets that menu option a little further down in that same file, around line 115 as I have captured below. You can set any width/height you would like there.
I hope that helps.
Cheers,
Tom
d3.select("#currentDisplay") .attr("item_value", (String(screenWidth) + "," + String(screenHeight))) .attr("class", "selected") .html("<a>" + screenWidth + "px - " + screenHeight + "px</a>");
-
|
You must be logged in to reply to this topic.