always fit browser width
This commit is contained in:
parent
3c07a6228d
commit
421581eadb
9
radia.js
9
radia.js
|
@ -2,6 +2,15 @@
|
|||
|
||||
|
||||
$(function() {
|
||||
$(window).resize(function() {
|
||||
var svgAspect = 1220 / 560;
|
||||
var windowWidth = $(window).width();
|
||||
var svgWidth = windowWidth - 20;
|
||||
var svgHeight = parseInt(svgWidth / svgAspect);
|
||||
$('svg').attr("width", svgWidth);
|
||||
$('svg').attr("height", svgHeight);
|
||||
});
|
||||
$(window).resize();
|
||||
$.getJSON("radia.json", {}, function(data) {
|
||||
var R = data;
|
||||
var $texts = [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user