From 2f6d9d6eadb928cf4b40b88a6427069059ebe72f Mon Sep 17 00:00:00 2001 From: Jordan Scales Date: Sun, 6 Sep 2015 23:27:50 -0400 Subject: [PATCH] Increased specificity on annotate.show()/hide() to prevent hiding the HeadingsPlugin summary levels --- plugins/shared/annotate/index.js | 4 ++-- plugins/shared/info-panel/index.js | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/shared/annotate/index.js b/plugins/shared/annotate/index.js index 80a4590a..6ae0170f 100644 --- a/plugins/shared/annotate/index.js +++ b/plugins/shared/annotate/index.js @@ -169,11 +169,11 @@ module.exports = (namespace) => { }, hide() { - $(".tota11y-label").hide(); + $(".tota11y.tota11y-label").hide(); }, show() { - $(".tota11y-label").show(); + $(".tota11y.tota11y-label").show(); }, removeAll() { diff --git a/plugins/shared/info-panel/index.js b/plugins/shared/info-panel/index.js index f1594add..7c851189 100644 --- a/plugins/shared/info-panel/index.js +++ b/plugins/shared/info-panel/index.js @@ -194,13 +194,11 @@ class InfoPanel { $activeTab = this._addTab("Summary", this.summary); } - // Wire annotation toggling. + // Wire annotation toggling this.$el.find(".toggle-annotation").click((e) => { if ($(e.target).prop("checked")) { - // Showing annotations. annotate.show(); } else { - // Hiding annotations. annotate.hide(); } });