fixed waifu mode expression centering for PC

This commit is contained in:
RossAscends
2023-04-22 03:20:25 +09:00
parent 1a914df4e0
commit b47b13b7ba
3 changed files with 11 additions and 10 deletions

View File

@ -123,7 +123,7 @@ async function moduleWorker() {
offlineMode.css('display', 'none'); offlineMode.css('display', 'none');
} }
// check if last message changed // check if last message changed
if ((lastCharacter === context.characterId || lastCharacter === context.groupId) if ((lastCharacter === context.characterId || lastCharacter === context.groupId)
&& lastMessage === currentLastMessage.mes) { && lastMessage === currentLastMessage.mes) {
@ -349,10 +349,12 @@ function onClickExpressionImage() {
(function () { (function () {
function addExpressionImage() { function addExpressionImage() {
const html = ` const html = `
<div id="expression-wrapper">
<div id="expression-holder" class="expression-holder" style="display:none;"> <div id="expression-holder" class="expression-holder" style="display:none;">
<div id="expression-holderheader" class="fa-solid fa-grip drag-grabber"></div> <div id="expression-holderheader" class="fa-solid fa-grip drag-grabber"></div>
<img id="expression-image" class="expression"> <img id="expression-image" class="expression">
</div>`; </div>
</div>`;
$('body').append(html); $('body').append(html);
} }
function addSettings() { function addSettings() {

View File

@ -4,6 +4,13 @@
vertical-align: middle; vertical-align: middle;
} }
#expression-wrapper {
display: flex;
height: calc(100vh - 40px);
width: 100vw;
justify-content: center;
}
.expression-holder { .expression-holder {
min-width: 100px; min-width: 100px;
min-height: 100px; min-height: 100px;

View File

@ -3320,17 +3320,9 @@ body.waifuMode .expression-holder {
max-width: 90vw; max-width: 90vw;
height: 90vh; height: 90vh;
width: fit-content; width: fit-content;
/* position: unset; */
left: calc((100vw - var(--sheldWidth))/2);
margin: 0 auto;
bottom: 0; bottom: 0;
filter: drop-shadow(2px 2px 2px #51515199); filter: drop-shadow(2px 2px 2px #51515199);
z-index: 2; z-index: 2;
/* resize: both; */
}
body.waifuMode img.expression {
/* height: 90vh; */
} }
body.movingUI .drag-grabber { body.movingUI .drag-grabber {