MCPcopy Create free account
hub / github.com/FastLED/FastLED / updateRecordButtonUI

Function updateRecordButtonUI

src/platforms/wasm/compiler/index.ts:1347–1367  ·  view source on GitHub ↗

* Updates record button UI state * @param {boolean} recording - Whether currently recording

(recording)

Source from the content-addressed store, hash-verified

1345 * @param {boolean} recording - Whether currently recording
1346 */
1347 function updateRecordButtonUI(recording) {
1348 isRecording = recording;
1349
1350 if (recording) {
1351 recordButton.classList.add('recording');
1352 const recordIcon = /** @type {HTMLElement|null} */ (recordButton.querySelector('.record-icon'));
1353 const stopIcon = /** @type {HTMLElement|null} */ (recordButton.querySelector('.stop-icon'));
1354 if (recordIcon) recordIcon.style.display = 'none';
1355 if (stopIcon) stopIcon.style.display = 'block';
1356 } else {
1357 recordButton.classList.remove('recording');
1358 const recordIcon = /** @type {HTMLElement|null} */ (recordButton.querySelector('.record-icon'));
1359 const stopIcon = /** @type {HTMLElement|null} */ (recordButton.querySelector('.stop-icon'));
1360 if (recordIcon) recordIcon.style.display = 'block';
1361 if (stopIcon) stopIcon.style.display = 'none';
1362 }
1363
1364 if (window.updateRecordButtonTooltip) {
1365 window.updateRecordButtonTooltip();
1366 }
1367 }
1368
1369 // Handle record button click
1370 recordButton.addEventListener('click', async () => {

Callers

nothing calls this directly

Calls 2

addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected