Following a previous blog post:
http://raptorlicious.blogspot.com/2017/08/debugging-window-thing-in-sigmajs.html
document.getElementById('graph-container').offsetWidth == 821
document.getElementById('graph-container').clientWidth == 811 (want?)
document.getElementById('graph-container').offSetHeight == 256
document.getElementById('graph-container').clientHeight == 247 (want?)
Previously, in D3 I fit the container by:
var height = document.getElementById('graphcontainer').clientHeight - 4
* document.getElementById('graphcontainer').clientTop;
var width = document.getElementById('graphcontainer').clientWidth - 2
* document.getElementById('graphcontainer').clientLeft; ++++++++++++++++++++++++++++++++++++ Do not worry about layout for now. You can fix this and the buttons later. For now look at
preparing the data for sigma.js instead of D3.
No comments:
Post a Comment