From db85421da18cfaaf1ed0361bc2a9ee40b5796344 Mon Sep 17 00:00:00 2001 From: bluelovers Date: Mon, 27 Feb 2023 09:52:55 +0800 Subject: [PATCH] feat: better lightbox when not enable zoom --- javascript/imageviewer.js | 2 +- style.css | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/javascript/imageviewer.js b/javascript/imageviewer.js index aac2ee82..28e748b7 100644 --- a/javascript/imageviewer.js +++ b/javascript/imageviewer.js @@ -11,7 +11,7 @@ function showModal(event) { if (modalImage.style.display === 'none') { lb.style.setProperty('background-image', 'url(' + source.src + ')'); } - lb.style.display = "block"; + lb.style.display = "flex"; lb.focus() const tabTxt2Img = gradioApp().getElementById("tab_txt2img") diff --git a/style.css b/style.css index 05572f66..4695cc29 100644 --- a/style.css +++ b/style.css @@ -436,9 +436,7 @@ input[type="range"]{ #modalImage { display: block; - margin-left: auto; - margin-right: auto; - margin-top: auto; + margin: auto; width: auto; }