Add new frequency graph

This commit is contained in:
Lewis Moten
2024-05-12 04:12:28 -04:00
parent 51a51d7e96
commit 015dd3eae3
8 changed files with 387 additions and 64 deletions

View File

@@ -0,0 +1,26 @@
import BasePanel from './BasePanel';
class GraphConfigurationPanel extends BasePanel {
constructor() {
super('Graphs');
this.addCheckboxes('checkboxes', [
{text: 'Pause after signal ends', id: 'pause-after-end', eventName: 'pauseAfterEndChange'}
])
this.openField('Duration');
this.addInputNumber('duration', 1, {min: 0.03, step: 0.001, eventName: 'durationChange'});
this.addText('s');
this.closeField();
};
getDurationSeconds = () => this.getNumberById('duration');
setDurationSeconds = (seconds) => this.setValueById('duration', seconds);
getDurationMilliseconds = () => this.getDurationSeconds() * 1000;
setDurationMilliseconds = (milliseconds) => this.setDurationSeconds(milliseconds / 1000);
getPauseAfterEnd = () => this.getCheckedById('pause-after-end');
setPauseAfterEnd = (value) => this.setCheckedById('pause-after-end', value);
}
export default GraphConfigurationPanel;