nylen / d3-process-map

Web application to illustrate the relationships between objects in a process using d3.js.
MIT License
416 stars 196 forks source link

Update object layout when browser window is resized #15

Open nylen opened 9 years ago

nylen commented 9 years ago

Something like this maybe:

 $(window).on('resize', function() {
    var graphWidth, graphHeight;
    // compute graphWidth, graphHeight
    graph.force.size([graphWidth, graphHeight]);
    graph.force.start();
});