From 7be73eda494631a50aac685884f954ae036f3111 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Wed, 17 Feb 2016 18:26:13 +0000 Subject: [PATCH] Remove plugin menu state tracking It's no longer necessary, as Polymer 1.x's menu button disables scrolling while a menu is open. Removing the data binding also avoids the `Cannot use 'in' operator to search for 'plugin' in undefined` that would occur when interacting with the plugin menu. --- src/gui/html/elements/loot-plugin-card.html | 2 +- src/gui/html/js/plugin.js | 1 - src/tests/gui/html/js/test_plugin.js | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gui/html/elements/loot-plugin-card.html b/src/gui/html/elements/loot-plugin-card.html index 40c8c5e1..da0c4100 100644 --- a/src/gui/html/elements/loot-plugin-card.html +++ b/src/gui/html/elements/loot-plugin-card.html @@ -155,7 +155,7 @@ loot-clear-metadata Loads Archive Has User Metadata - + Show Only Conflicts diff --git a/src/gui/html/js/plugin.js b/src/gui/html/js/plugin.js index 77c52c93..166e25b9 100644 --- a/src/gui/html/js/plugin.js +++ b/src/gui/html/js/plugin.js @@ -186,7 +186,6 @@ /* UI state variables */ this.id = this.name.replace(/\s+/g, ''); - this.isMenuOpen = false; this._isEditorOpen = false; this.isConflictFilterChecked = false; this._isSearchResult = false; diff --git a/src/tests/gui/html/js/test_plugin.js b/src/tests/gui/html/js/test_plugin.js index a80fa77a..79b9ed50 100644 --- a/src/tests/gui/html/js/test_plugin.js +++ b/src/tests/gui/html/js/test_plugin.js @@ -256,12 +256,6 @@ describe('Plugin', () => { plugin.id.should.equal('testpluginname'); }); - it('should set isMenuOpen to false', () => { - const plugin = new loot.Plugin({ name: 'test' }); - - plugin.isMenuOpen.should.be.false(); - }); - it('should set isEditorOpen to false', () => { const plugin = new loot.Plugin({ name: 'test' });