highlight new created character after auto-scroll

This commit is contained in:
RossAscends
2023-05-18 19:23:13 +09:00
parent 8d11d5d8d5
commit 0d248a0092
2 changed files with 16 additions and 14 deletions

View File

@ -2166,7 +2166,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
type: 'POST', // type: 'POST', //
url: generate_url, // url: generate_url, //
data: JSON.stringify(generate_data), data: JSON.stringify(generate_data),
beforeSend: () => {}, beforeSend: () => { },
cache: false, cache: false,
dataType: "json", dataType: "json",
contentType: "application/json", contentType: "application/json",
@ -4109,10 +4109,10 @@ function select_rm_info(type, charId) {
const element = $(`#rm_characters_block [title="${charId + '.png'}"]`).get(0); const element = $(`#rm_characters_block [title="${charId + '.png'}"]`).get(0);
element.scrollIntoView({ behavior: 'smooth', block: 'end' }); element.scrollIntoView({ behavior: 'smooth', block: 'end' });
/* $(`#rm_characters_block [title="${charId + '.png'}"]`).parent.addClass('flash animated'); $(`#rm_characters_block [title="${charId + '.png'}"]`).parent().addClass('flash animated');
setTimeout(function(){ setTimeout(function () {
$(`#rm_characters_block [title="${charId + '.png'}"]`).parent.addClass('flash animated'); $(`#rm_characters_block [title="${charId + '.png'}"]`).parent().removeClass('flash animated');
}, 1000); */ }, 5000);
} }

View File

@ -133,23 +133,25 @@ table.responsiveTable {
} }
.animated { .animated {
-webkit-animation-duration: 1s; -webkit-animation-duration: 3s !important;
animation-duration: 1s; animation-duration: 3s !important;
-webkit-animation-fill-mode: both; -webkit-animation-fill-mode: both !important;
animation-fill-mode: both; animation-fill-mode: both !important;
box-shadow: inset 0 0 5px var(--SmartThemeQuoteColor);
} }
@keyframes flash { @keyframes flash {
0%, 20%,
50%, 60%,
100% { 100% {
opacity: 1; opacity: 1;
} }
25%, 0%,
75% { 40%,
opacity: 0; 80% {
opacity: 0.2;
} }
} }