MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / resizeNode

Function resizeNode

frontend/layout/lib/layoutTree.ts:379–391  ·  view source on GitHub ↗
(layoutState: LayoutTreeState, action: LayoutTreeResizeNodeAction)

Source from the content-addressed store, hash-verified

377}
378
379export function resizeNode(layoutState: LayoutTreeState, action: LayoutTreeResizeNodeAction) {
380 if (!action.resizeOperations) {
381 console.error("invalid resizeNode operation. nodeSizes array must be defined.");
382 }
383 for (const resize of action.resizeOperations) {
384 if (!resize.nodeId || resize.size < 0 || resize.size > 100) {
385 console.error("invalid resizeNode operation. nodeId must be defined and size must be between 0 and 100");
386 return;
387 }
388 const node = findNode(layoutState.rootNode, resize.nodeId);
389 node.size = resize.size;
390 }
391}
392
393export function focusNode(layoutState: LayoutTreeState, action: LayoutTreeFocusNodeAction) {
394 if (!action.nodeId) {

Callers 1

treeReducerMethod · 0.90

Calls 1

findNodeFunction · 0.90

Tested by

no test coverage detected