OSDN Git Service

グラフのリサイズがうまくいかないことがあるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Wed, 13 Sep 2017 09:37:47 +0000 (18:37 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Mon, 18 Sep 2017 08:34:19 +0000 (17:34 +0900)
LogViewer/index.html
LogViewer/tags.html

index 7f00db6..ea53dcb 100644 (file)
@@ -73,8 +73,8 @@ var mixin = {
     pxPerEm: Number(getComputedStyle(document.body, null).fontSize.replace(/[^\d]/g, '')),
     chartSize: function() {
         return {
-            height: Math.max($(document).height() - 15 * this.pxPerEm, 400),
-            width: Math.max($(document).width() - 6 * this.pxPerEm, 800)
+            height: Math.max($(window).height() - 15 * this.pxPerEm, 400),
+            width: Math.max($(window).width() - 6 * this.pxPerEm, 800)
         };
     }
 };
index fdddcd2..cd859a6 100644 (file)
@@ -874,7 +874,7 @@ this.calcChartData = function() {
 };
 
 this.chartSize = function() {
-    var width = Math.max($(document).width() - 6 * this.pxPerEm, 800);
+    var width = Math.max($(window).width() - 6 * this.pxPerEm, 800);
     return {
         height: width * 0.4,
         width: width