mirror of
https://github.com/wavetermdev/waveterm
synced 2026-05-05 22:48:48 +00:00
Make the block content sizing update once when its node moves or becomes magnified. By manually updating this inner sizing rather than letting the block flow in the DOM, the animations of the block frames are much smoother. This also fixes an issue where two scrollbars were being rendered for the Directory Preview widget. This also sets zero padding on nodes when there's only a single node being rendered.
70 lines
1.9 KiB
TypeScript
70 lines
1.9 KiB
TypeScript
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { TileLayout } from "./lib/TileLayout";
|
|
import { LayoutModel } from "./lib/layoutModel";
|
|
import {
|
|
deleteLayoutModelForTab,
|
|
getLayoutModelForActiveTab,
|
|
getLayoutModelForTab,
|
|
getLayoutModelForTabById,
|
|
useDebouncedNodeInnerRect,
|
|
useLayoutModel,
|
|
} from "./lib/layoutModelHooks";
|
|
import { newLayoutNode } from "./lib/layoutNode";
|
|
import type {
|
|
ContentRenderer,
|
|
LayoutNode,
|
|
LayoutTreeAction,
|
|
LayoutTreeClearPendingAction,
|
|
LayoutTreeCommitPendingAction,
|
|
LayoutTreeComputeMoveNodeAction,
|
|
LayoutTreeDeleteNodeAction,
|
|
LayoutTreeFocusNodeAction,
|
|
LayoutTreeInsertNodeAction,
|
|
LayoutTreeInsertNodeAtIndexAction,
|
|
LayoutTreeMagnifyNodeToggleAction,
|
|
LayoutTreeMoveNodeAction,
|
|
LayoutTreeResizeNodeAction,
|
|
LayoutTreeSetPendingAction,
|
|
LayoutTreeStateSetter,
|
|
LayoutTreeSwapNodeAction,
|
|
NodeModel,
|
|
PreviewRenderer,
|
|
} from "./lib/types";
|
|
import { DropDirection, LayoutTreeActionType, NavigateDirection } from "./lib/types";
|
|
|
|
export {
|
|
deleteLayoutModelForTab,
|
|
DropDirection,
|
|
getLayoutModelForActiveTab,
|
|
getLayoutModelForTab,
|
|
getLayoutModelForTabById,
|
|
LayoutModel,
|
|
LayoutTreeActionType,
|
|
NavigateDirection,
|
|
newLayoutNode,
|
|
TileLayout,
|
|
useDebouncedNodeInnerRect,
|
|
useLayoutModel,
|
|
};
|
|
export type {
|
|
ContentRenderer,
|
|
LayoutNode,
|
|
LayoutTreeAction,
|
|
LayoutTreeClearPendingAction,
|
|
LayoutTreeCommitPendingAction,
|
|
LayoutTreeComputeMoveNodeAction,
|
|
LayoutTreeDeleteNodeAction,
|
|
LayoutTreeFocusNodeAction,
|
|
LayoutTreeInsertNodeAction,
|
|
LayoutTreeInsertNodeAtIndexAction,
|
|
LayoutTreeMagnifyNodeToggleAction,
|
|
LayoutTreeMoveNodeAction,
|
|
LayoutTreeResizeNodeAction,
|
|
LayoutTreeSetPendingAction,
|
|
LayoutTreeStateSetter,
|
|
LayoutTreeSwapNodeAction,
|
|
NodeModel,
|
|
PreviewRenderer,
|
|
};
|