resize.js 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. window.onresize = resizeAll;
  2. function resizeAll() {
  3. $('[style-height="10"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
  4. $('[style-height="20"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
  5. $('[style-height="30"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
  6. $('[style-height="40"]').each(function(one,items){$(items).height(window.innerHeight * 0.4)});
  7. $('[style-height="50"]').each(function(one,items){$(items).height(window.innerHeight * 0.5)});
  8. $('[style-height="60"]').each(function(one,items){$(items).height(window.innerHeight * 0.6)});
  9. $('[style-height="70"]').each(function(one,items){$(items).height(window.innerHeight * 0.7)});
  10. $('[style-height="80"]').each(function(one,items){$(items).height(window.innerHeight * 0.8)});
  11. $('[style-height="90"]').each(function(one,items){$(items).height(window.innerHeight * 0.9)});
  12. $('[style-height="100"]').each(function(one,items){$(items).height(window.innerHeight)});
  13. $('[style-height="30-r"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
  14. $(".graphsize").each(function(a,grp){
  15. let graph = $(grp);
  16. graph.width(window.innerWidth - 35);
  17. graph.height(window.innerHeight *0.2);
  18. if (graph.highcharts !== undefined) {
  19. graph.highcharts().reflow();
  20. }
  21. })
  22. }
  23. var resizeTimer = setInterval(function () {
  24. resizeAll();
  25. }, 5000);
  26. resizeAll();