Adjust maxBars calculation in webViewTransformer to include patternEvents
This commit is contained in:
@@ -45,7 +45,11 @@ function webViewTransformer(data: ProjectRawData): ViewData {
|
||||
scenes.forEach((scene, idx) => {
|
||||
newScenes[idx] = {
|
||||
name: scene.name,
|
||||
maxBars: Math.max(...scene.patterns.map((p) => p.bars), 0),
|
||||
maxBars: Math.max(
|
||||
1,
|
||||
...scene.patterns.map((pattern) => pattern.bars),
|
||||
...Object.values(scene.patternEvents).map((pattern) => pattern?.bars || 0),
|
||||
),
|
||||
patterns: [],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user