fix: "back to beginning" button should also shift viewport to the beginning of the song
This commit is contained in:
@@ -53,7 +53,8 @@ const Toolbar: React.FC = () => {
|
|||||||
// Selection state
|
// Selection state
|
||||||
selectedRegionIds,
|
selectedRegionIds,
|
||||||
// Playhead and refresh
|
// Playhead and refresh
|
||||||
playheadPosition, refreshProjectState
|
playheadPosition, refreshProjectState,
|
||||||
|
requestMainContentScroll, requestPianoRollScroll
|
||||||
} = useProjectStore();
|
} = useProjectStore();
|
||||||
|
|
||||||
// State for main content tools
|
// State for main content tools
|
||||||
@@ -533,6 +534,8 @@ const Toolbar: React.FC = () => {
|
|||||||
console.log("Back to beginning button clicked");
|
console.log("Back to beginning button clicked");
|
||||||
}
|
}
|
||||||
setPlayheadPosition(0);
|
setPlayheadPosition(0);
|
||||||
|
requestMainContentScroll(0);
|
||||||
|
requestPianoRollScroll(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleLoopToggle = () => {
|
const handleLoopToggle = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user