initial implementation of move block to window (#77)

This commit is contained in:
Mike Sawka
2024-06-25 14:56:37 -07:00
committed by GitHub
parent 182c5f6e3d
commit 7b93354657
11 changed files with 219 additions and 24 deletions
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import { LayoutTreeState } from "@/faraday/index";
function findLeafIdFromBlockId(layoutTree: LayoutTreeState<TabLayoutData>, blockId: string): string {
if (layoutTree?.leafs == null) {
return null;
}
for (let leaf of layoutTree.leafs) {
if (leaf.data.blockId == blockId) {
return leaf.id;
}
}
return null;
}
export { findLeafIdFromBlockId };