Smarter hide by tags

This commit is contained in:
SillyLossy
2023-04-29 17:44:15 +03:00
parent ba1a23fd88
commit ac88107ef5
2 changed files with 6 additions and 2 deletions

View File

@@ -190,7 +190,7 @@ function onTagFilterClick() {
function applyFilterToElement(tagId, element) {
const isTagged = isElementTagged(element, tagId);
$(element).css('display', !isTagged ? 'none' : '');
$(element).toggleClass('hiddenByTag', !isTagged);
}
function isElementTagged(element, tagId) {
@@ -205,7 +205,7 @@ function isElementTagged(element, tagId) {
function clearTagsFilter() {
$('#rm_tag_filter .tag').removeClass('selected');
$('#rm_print_characters_block > div').css('display', '');
$('#rm_print_characters_block > div').removeClass('hiddenByTag');
}
function printTags() {