Allow dragging of Splits

This commit is contained in:
Robin E.R. Davies
2026-06-15 09:30:52 -04:00
parent 9c9096b984
commit 84b9469896
3 changed files with 112 additions and 45 deletions
+17
View File
@@ -144,6 +144,23 @@ export class PedalboardItem implements Deserializable<PedalboardItem> {
}
isChild(instanceId: number): boolean {
if (this.instanceId === instanceId) return true;
if (this.isSplit())
{
let splitItem = this as unknown as PedalboardSplitItem;
for (let topItem of splitItem.topChain)
{
if (topItem.isChild(instanceId)) return true;
}
for (let bottomItem of splitItem.bottomChain)
{
if (bottomItem.isChild(instanceId)) return true;
}
}
return false;
}
getControlValue(key: string): number {
for (let i = 0; i < this.controlValues.length; ++i) {
let v = this.controlValues[i];