From 30a67b729d9224d65e95ac9ad1a41128335cc29d Mon Sep 17 00:00:00 2001 From: Sam El-Husseini <16690124+samelhusseini@users.noreply.github.com> Date: Thu, 3 May 2018 15:02:13 -0700 Subject: [PATCH] Align all modules to a minimum height. (#563) --- sim/visuals/layoutView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sim/visuals/layoutView.ts b/sim/visuals/layoutView.ts index 2d9465bf..e7b844ee 100644 --- a/sim/visuals/layoutView.ts +++ b/sim/visuals/layoutView.ts @@ -12,6 +12,7 @@ namespace pxsim.visuals { export const MODULE_INNER_PADDING_RATIO = 1 / 35; export const MAX_MODULE_WIDTH = 100; + export const MIN_MODULE_HEIGHT = 40; export const CLOSE_ICON_GAP_MULTIPLIER = 0.3; @@ -372,7 +373,7 @@ namespace pxsim.visuals { // Translate and resize view view.resize(inputWidth - inputPadding * 2, inputHeight); - const viewHeight = view.getActualHeight(); + const viewHeight = Math.max(view.getActualHeight(), MIN_MODULE_HEIGHT); view.translate(inputPadding, 0, true); // Resize control