From d22fb20da5966da97aa56a372bd391a25e6f4365 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 10 Jul 2019 22:23:06 +0000 Subject: [PATCH] Fix graph title space --- Architype.js | 1 - Layout.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Architype.js b/Architype.js index ac652cd..fb16c69 100644 --- a/Architype.js +++ b/Architype.js @@ -246,7 +246,6 @@ class Architype { fixSizes() { for (let node of this.toSize_) { - console.log(node, node.scrollHeight, node.clientHeight); node.style.fontSize = null; for (let size = 30; size && (node.scrollWidth > node.clientWidth || diff --git a/Layout.js b/Layout.js index 69291d2..d7a077d 100644 --- a/Layout.js +++ b/Layout.js @@ -146,8 +146,8 @@ class Layout { } fixOrigin() { - let min = [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]; - let max = [Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER]; + let min = [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY]; + let max = [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY]; for (let group of this.groups_) { let [groupMin, groupMax] = group.getMinMax(); for (let i of [0, 1]) { @@ -165,7 +165,7 @@ class Layout { } if (this.graph_.label) { - min[0] -= 1; + min[1] -= 1; } // Set a minimum size and center the smaller graph