asigalov61 commited on
Commit
a9a95d0
1 Parent(s): fe2ce1d

Update javascript/app.js

Browse files
Files changed (1) hide show
  1. javascript/app.js +19 -2
javascript/app.js CHANGED
@@ -116,6 +116,23 @@ class MidiVisualizer extends HTMLElement {
116
  noteHeight: 4,
117
  beatWidth: 32,
118
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  this.tickPreBeat = 500;
120
  this.svgWidth = 0;
121
  this.playTime = 0;
@@ -372,11 +389,11 @@ customElements.define('midi-visualizer', MidiVisualizer);
372
  divProgress.className = 'progressDiv';
373
  const rect = progressbarContainer.getBoundingClientRect();
374
  divProgress.style.width = rect.width + 'px';
375
- divProgress.style.background = 'black';
376
  divProgress.style.borderRadius = '8px';
377
  const divInner = document.createElement('div');
378
  divInner.className = 'progress';
379
- divInner.style.color = 'black';
380
  divInner.style.background = '#0060df';
381
  divInner.style.textAlign = 'right';
382
  divInner.style.fontWeight = 'bold';
 
116
  noteHeight: 4,
117
  beatWidth: 32,
118
  };
119
+
120
+ // Set the background color for the shadow DOM
121
+ this.shadowRoot.innerHTML = `
122
+ <style>
123
+ :host {
124
+ background-color: #your-color-here; /* Replace with your desired background color */
125
+ display: block;
126
+ overflow: hidden;
127
+ }
128
+ .note.active {
129
+ stroke: black;
130
+ stroke-width: 0.75;
131
+ stroke-opacity: 0.75;
132
+ }
133
+ </style>
134
+ `;
135
+
136
  this.tickPreBeat = 500;
137
  this.svgWidth = 0;
138
  this.playTime = 0;
 
389
  divProgress.className = 'progressDiv';
390
  const rect = progressbarContainer.getBoundingClientRect();
391
  divProgress.style.width = rect.width + 'px';
392
+ divProgress.style.background = 'white';
393
  divProgress.style.borderRadius = '8px';
394
  const divInner = document.createElement('div');
395
  divInner.className = 'progress';
396
+ divInner.style.color = 'white';
397
  divInner.style.background = '#0060df';
398
  divInner.style.textAlign = 'right';
399
  divInner.style.fontWeight = 'bold';