mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
remove layout Dimensions declaration in favor of global
This commit is contained in:
parent
bdfd7b22d9
commit
319d84d0b5
@ -35,7 +35,7 @@ import {
|
|||||||
TileLayoutContents,
|
TileLayoutContents,
|
||||||
WritableLayoutTreeStateAtom,
|
WritableLayoutTreeStateAtom,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import { Dimensions, FlexDirection, setTransform } from "./utils";
|
import { FlexDirection, setTransform } from "./utils";
|
||||||
|
|
||||||
interface ResizeContext {
|
interface ResizeContext {
|
||||||
handleId: string;
|
handleId: string;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import { WritableAtom } from "jotai";
|
import { WritableAtom } from "jotai";
|
||||||
import { CSSProperties } from "react";
|
import { CSSProperties } from "react";
|
||||||
import { Dimensions, DropDirection, FlexDirection } from "./utils.js";
|
import { DropDirection, FlexDirection } from "./utils.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an operation to insert a node into a tree.
|
* Represents an operation to insert a node into a tree.
|
||||||
|
@ -4,13 +4,6 @@
|
|||||||
import { CSSProperties } from "react";
|
import { CSSProperties } from "react";
|
||||||
import { XYCoord } from "react-dnd";
|
import { XYCoord } from "react-dnd";
|
||||||
|
|
||||||
export interface Dimensions {
|
|
||||||
width: number;
|
|
||||||
height: number;
|
|
||||||
left: number;
|
|
||||||
top: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum DropDirection {
|
export enum DropDirection {
|
||||||
Top = 0,
|
Top = 0,
|
||||||
Right = 1,
|
Right = 1,
|
||||||
|
@ -2,13 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { assert, test } from "vitest";
|
import { assert, test } from "vitest";
|
||||||
import {
|
import { DropDirection, FlexDirection, determineDropDirection, reverseFlexDirection } from "../lib/utils.js";
|
||||||
Dimensions,
|
|
||||||
DropDirection,
|
|
||||||
FlexDirection,
|
|
||||||
determineDropDirection,
|
|
||||||
reverseFlexDirection,
|
|
||||||
} from "../lib/utils.js";
|
|
||||||
|
|
||||||
test("determineDropDirection", () => {
|
test("determineDropDirection", () => {
|
||||||
const dimensions: Dimensions = {
|
const dimensions: Dimensions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user