Move text wysiwyg back

This commit is contained in:
Marcel Mraz 2025-03-13 13:46:45 +01:00
parent ee66433a31
commit a61fdb428c
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
3 changed files with 38 additions and 38 deletions

View file

@ -364,7 +364,7 @@ import {
hitElementBoundingBoxOnly,
hitElementItself,
} from "../element/collision";
import { textWysiwyg } from "../element/textWysiwyg";
import { textWysiwyg } from "../wysiwyg/textWysiwyg";
import { isOverScrollBars } from "../scene/scrollbars";
import { syncInvalidIndices, syncMovedIndices } from "../fractionalIndex";
import { getVisibleSceneBounds } from "../element/bounds";

View file

@ -1,6 +1,11 @@
import { pointFrom } from "@excalidraw/math";
import { getOriginalContainerHeightFromCache } from "@excalidraw/element/containerCache";
import { queryByText } from "@testing-library/react";
import React from "react";
import type {
ExcalidrawTextElement,
ExcalidrawTextElementWithContainer,
} from "@excalidraw/element/types";
import { FONT_FAMILY, TEXT_ALIGN, VERTICAL_ALIGN } from "../constants";
import { Excalidraw } from "../index";
@ -20,13 +25,6 @@ import {
restoreOriginalGetBoundingClientRect,
} from "../tests/test-utils";
import { getOriginalContainerHeightFromCache } from "./containerCache";
import type {
ExcalidrawTextElement,
ExcalidrawTextElementWithContainer,
} from "./types";
unmountComponent();
const tab = " ";

View file

@ -1,29 +1,10 @@
import {
actionResetZoom,
actionZoomIn,
actionZoomOut,
} from "../actions/actionCanvas";
import {
actionDecreaseFontSize,
actionIncreaseFontSize,
} from "../actions/actionProperties";
import { parseClipboard } from "../clipboard";
import { CLASSES, POINTER_BUTTON } from "../constants";
import { CODES, KEYS } from "../keys";
import Scene from "../scene/Scene";
import {
isWritableElement,
getFontString,
getFontFamilyString,
isTestEnv,
} from "../utils";
import {
originalContainerCache,
updateOriginalContainerCache,
} from "./containerCache";
import { LinearElementEditor } from "./linearElementEditor";
import { bumpVersion, mutateElement } from "./mutateElement";
} from "@excalidraw/element/containerCache";
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
import { bumpVersion, mutateElement } from "@excalidraw/element/mutateElement";
import {
getBoundTextElementId,
getContainerElement,
@ -34,22 +15,43 @@ import {
computeContainerDimensionForBoundText,
computeBoundTextPosition,
getBoundTextElement,
} from "./textElement";
import { getTextWidth } from "./textMeasurements";
import { normalizeText } from "./textMeasurements";
import { wrapText } from "./textWrapping";
} from "@excalidraw/element/textElement";
import { getTextWidth } from "@excalidraw/element/textMeasurements";
import { normalizeText } from "@excalidraw/element/textMeasurements";
import { wrapText } from "@excalidraw/element/textWrapping";
import {
isArrowElement,
isBoundToContainer,
isTextElement,
} from "./typeChecks";
} from "@excalidraw/element/typeChecks";
import type {
ExcalidrawElement,
ExcalidrawLinearElement,
ExcalidrawTextElementWithContainer,
ExcalidrawTextElement,
} from "./types";
} from "@excalidraw/element/types";
import {
isWritableElement,
getFontString,
getFontFamilyString,
isTestEnv,
} from "../utils";
import Scene from "../scene/Scene";
import { CODES, KEYS } from "../keys";
import { CLASSES, POINTER_BUTTON } from "../constants";
import { parseClipboard } from "../clipboard";
import {
actionDecreaseFontSize,
actionIncreaseFontSize,
} from "../actions/actionProperties";
import {
actionResetZoom,
actionZoomIn,
actionZoomOut,
} from "../actions/actionCanvas";
import type App from "../components/App";
import type { AppState } from "../types";