melhorando a leitura de projetos no mmpCreator
This commit is contained in:
1 parent
d4512bba35
commit
c16288b3cb
1 file changed
+3
-12
@@ -262,7 +262,7 @@ export function renderAudioEditor() {
|
||||
const newTrackContainer = existingTrackContainer.cloneNode(false);
|
||||
tracksParent.replaceChild(newTrackContainer, existingTrackContainer);
|
||||
// ✅ único scroller horizontal/vertical do editor
|
||||
const scrollEl = existingTrackContainer; // #audio-track-container
|
||||
const scrollEl = newTrackContainer; // #audio-track-container
|
||||
|
||||
// === RENDERIZAÇÃO DAS PISTAS (LANES) ===
|
||||
|
||||
@@ -528,13 +528,14 @@ export function renderAudioEditor() {
|
||||
}
|
||||
|
||||
newTrackContainer.addEventListener("scroll", () => {
|
||||
scrollEl.addEventListener("scroll", () => {
|
||||
newTrackContainer.addEventListener("scroll", () => {
|
||||
const scrollPos = scrollEl.scrollLeft;
|
||||
|
||||
const mainRuler = tracksParent.querySelector(".timeline-ruler");
|
||||
if (mainRuler && mainRuler.scrollLeft !== scrollPos) {
|
||||
mainRuler.scrollLeft = scrollPos; // funciona com overflow hidden (scroll programático)
|
||||
}
|
||||
});
|
||||
|
||||
// expansão "infinita"
|
||||
const threshold = 300;
|
||||
@@ -829,16 +830,6 @@ export function renderAudioEditor() {
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
function sendActionSafe(action) {
|
||||
try {
|
||||
sendAction(action);
|
||||
} catch (err) {
|
||||
console.warn("[SYNC] Falha ao emitir ação:", action.type, err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function updateAudioEditorUI() {
|
||||
const playBtn = document.getElementById("audio-editor-play-btn");
|
||||
|
||||
Reference in new issue
Block a user