Improve tag visibility toggle logic (#4425) * Improve tag visibility toggle logic Cache selector once, and remove hardcoded animation duration. Takes 300 tags down from 3 seconds down to 2ms per toggle. * whitespace fix

6166348ec803e5a233f57bb9061955d380775ed9

DepFA <35278260+dfaker@users.noreply.github.com>

Signed
1 files changed, +9 -3Ignore whitespace
public/scripts/tags.js+9 -3
@@ -1822,12 +1822,18 @@ const debouncedTagColoring = debounce((tagId, cssProperty, newColor) => {
18221822
1823function onTagListHintClick() {1823function onTagListHintClick() {
1824 $(this).toggleClass('selected');1824 $(this).toggleClass('selected');
1825 $(this).siblings('.tag:not(.actionable)').toggle(100);
1826 $(this).siblings('.innerActionable').toggleClass('hidden');
18271825
1826 const $tagSiblings = $(this).siblings('.tag:not(.actionable)');
1827
1828 if ($(this).hasClass('selected')) {
1829 $tagSiblings.show();
1830 } else {
1831 $tagSiblings.hide();
1832 }
1833
1834 $(this).siblings('.innerActionable').toggleClass('hidden');
1828 power_user.show_tag_filters = $(this).hasClass('selected');1835 power_user.show_tag_filters = $(this).hasClass('selected');
1829 saveSettingsDebounced();1836 saveSettingsDebounced();
1830
1831 console.debug('show_tag_filters', power_user.show_tag_filters);1837 console.debug('show_tag_filters', power_user.show_tag_filters);
1832}1838}
18331839