From c8786ca00f77bd61bf6b92cb3af9aa78eeb11107 Mon Sep 17 00:00:00 2001 From: cutls Date: Tue, 11 Feb 2020 01:55:40 +0900 Subject: [PATCH] Fix: img modal when window is too narrow --- app/css/master.css | 2 +- app/js/platform/first.js | 2 +- app/js/ui/img.js | 8 ++++---- app/package.json | 4 ++-- app/view/make/index.sample.html | 15 ++++++++++----- app/yarn.lock | 10 +++++----- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/app/css/master.css b/app/css/master.css index 54ebc758..4568487a 100644 --- a/app/css/master.css +++ b/app/css/master.css @@ -57,7 +57,7 @@ option { padding: 0; } #imagemodal .modal-footer { - overflow-x: scroll; + overflow-x: hidden; overflow-y: hidden; } diff --git a/app/js/platform/first.js b/app/js/platform/first.js index d309c3d4..6fd6276d 100644 --- a/app/js/platform/first.js +++ b/app/js/platform/first.js @@ -205,7 +205,7 @@ function escapeCsv(str) { return str } var result - result = str.replace(/\"/g, '""') + result = str.toString().replace(/\"/g, '""') if (result.indexOf(',') >= 0) { result = '"' + result + '"' } diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 702d53a7..65325eda 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -128,13 +128,13 @@ function imageXhr(id, key, murl) { $('#imagemodal').css('bottom', '0') $('#imagemodal img').css('width', 'auto') if (height < windowH) { - $('#imagemodal').css('height', height + 60 + 'px') - $('#imagemodal img').css('height', '100%') + $('#imagemodal').css('height', height + 100 + 'px') + $('#imagemodal img').css('height', height + 'px') if (width > windowW * 0.8) { $('#imagemodal').css('width', '80vw') - $('#imagemodal img').css('width', '100%') + $('#imagemodal img').css('width', 'auto') var heightS = ((windowW * 0.8) / width) * height - $('#imagemodal').css('height', heightS + 60 + 'px') + $('#imagemodal').css('height', heightS + 100 + 'px') } else { $('#imagemodal').css('width', width + 'px') } diff --git a/app/package.json b/app/package.json index a69ca49c..d25416e1 100644 --- a/app/package.json +++ b/app/package.json @@ -56,9 +56,9 @@ "jimp": "^0.9.3", "jquery": "^3.4.1", "jquery-ui-dist": "^1.12.1", - "materialize-css": "git://github.com/cutls/materialize#v1-dev", "json5": "^2.1.1", "lodash": "^4.17.15", + "materialize-css": "git://github.com/cutls/materialize#v1-dev", "sumchecker": "^3.0.1", "sweetalert2": "^9.7.2", "vue": "^2.6.11" @@ -69,7 +69,7 @@ }, "devDependencies": { "chokidar": "^3.3.1", - "electron": "^7.1.8", + "electron": "^8.0.0", "electron-builder": "^22.1.0", "electron-rebuild": "^1.10.0", "readline-sync": "1.4.10" diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index cb9f30e2..431ea2da 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -1071,7 +1071,7 @@ -