From bdb3cb53e7c9baf40a0735f987435d23dfd38906 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 19 Dec 2024 15:28:27 -0800 Subject: [PATCH] fixes --- js/ChromalinkPanel.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/js/ChromalinkPanel.js b/js/ChromalinkPanel.js index 937b781..a98c3b3 100644 --- a/js/ChromalinkPanel.js +++ b/js/ChromalinkPanel.js @@ -2,7 +2,7 @@ import Panel from './Panel.js'; import Notification from './Notification.js'; export default class ChromalinkPanel extends Panel { - constructor(editor, modesPanel) { + constructor(editor) { const content = `
@@ -29,7 +29,6 @@ export default class ChromalinkPanel extends Panel { super('chromalinkPanel', content, 'Chromalink Duo'); this.editor = editor; this.vortexPort = editor.vortexPort; - this.modesPanel = modesPanel; this.isConnected = false; } @@ -103,9 +102,9 @@ export default class ChromalinkPanel extends Panel { } this.editor.lightshow.vortex.clearModes(); this.editor.lightshow.setLedCount(2); - this.modesPanel.updateSelectedDevice('Duo', true); - //this.modesPanel.renderLedIndicators('Duo'); - this.modesPanel.selectAllLeds(); + this.editor.modesPanel.updateSelectedDevice('Duo', true); + //this.editor.modesPanel.renderLedIndicators('Duo'); + this.editor.modesPanel.selectAllLeds(); // update ui document.getElementById('duoIcon').style.display = 'block'; document.getElementById('duoInfo').style.display = 'block'; @@ -134,9 +133,9 @@ export default class ChromalinkPanel extends Panel { throw new Error('Failed to restore old modes'); } this.oldModes = null; - this.modesPanel.updateSelectedDevice('Chromadeck', true); - this.modesPanel.renderLedIndicators('Chromadeck'); - this.modesPanel.selectAllLeds(); + this.editor.modesPanel.updateSelectedDevice('Chromadeck', true); + this.editor.modesPanel.renderLedIndicators('Chromadeck'); + this.editor.modesPanel.selectAllLeds(); const flashButton = document.getElementById('chromalinkFlash'); const updateButton = document.getElementById('chromalinkUpdate'); flashButton.disabled = true; @@ -190,7 +189,7 @@ export default class ChromalinkPanel extends Panel { } catch (error) { Notification.failure('Failed to pull modes: ' + error.message); } - this.modesPanel.refreshModeList(); // Refresh modes in the UI + this.editor.modesPanel.refreshModeList(); // Refresh modes in the UI } // Push modes to Duo via Chromalink