From d4cc72304edc4c5364f0c66bdb016794f6374df4 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 23 Nov 2020 12:35:20 +0100 Subject: [PATCH] Use flexbox for crop editor box sizing. --- public/css/admin.css | 3 +++ public/js/crop_editor.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/public/css/admin.css b/public/css/admin.css index af84404..36534d2 100644 --- a/public/css/admin.css +++ b/public/css/admin.css @@ -145,6 +145,8 @@ body { /* Crop editor ----------------*/ #crop_editor { + display: flex; + flex-direction: column; position: fixed; top: 0; left: 0; @@ -161,6 +163,7 @@ body { } .crop_image_container { position: relative; + flex-grow: 1; } .crop_position { background: rgba(0, 0, 0, 1.0); diff --git a/public/js/crop_editor.js b/public/js/crop_editor.js index a067910..ec1511a 100644 --- a/public/js/crop_editor.js +++ b/public/js/crop_editor.js @@ -131,7 +131,7 @@ class CropEditor { } showContainer() { - this.container.style.display = "block"; + this.container.style.display = ''; this.setInputValues(); this.positionBoundary(); }