melhorando a leitura de projetos no mmpCreator

This commit is contained in:
JotaChina committed 2025-12-23 21:23:06 -03:00
1 parent e98a2bc416
commit 05f132dc84
3 files changed
+12 -4

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ import {
getBeatsPerBar,
getSecondsPerStep,
} from "../utils.js";
import { sendAction } from "../socket.js";
import { sendAction, sendActionSafe } from "../socket.js";
export function renderAudioEditor() {
const audioEditor = document.querySelector(".audio-editor");
@@ -262,7 +262,7 @@ export function renderAudioEditor() {
const newTrackContainer = existingTrackContainer.cloneNode(false);
tracksParent.replaceChild(newTrackContainer, existingTrackContainer);
// ✅ único scroller horizontal/vertical do editor
const scrollEl = newTrackContainer;
const scrollEl = existingTrackContainer; // #audio-track-container
// === RENDERIZAÇÃO DAS PISTAS (LANES) ===
+8
View File
@@ -128,6 +128,14 @@ export function setUserName(name) {
USER_NAME = name;
}
export function sendActionSafe(action) {
try {
sendAction(action);
} catch (err) {
console.warn("[SYNC] Falha ao emitir ação:", action?.type, err);
}
}
// -----------------------------------------------------------------------------
// CONEXÃO / JOIN / LOGS
// -----------------------------------------------------------------------------