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, hitElementBoundingBoxOnly,
hitElementItself, hitElementItself,
} from "../element/collision"; } from "../element/collision";
import { textWysiwyg } from "../element/textWysiwyg"; import { textWysiwyg } from "../wysiwyg/textWysiwyg";
import { isOverScrollBars } from "../scene/scrollbars"; import { isOverScrollBars } from "../scene/scrollbars";
import { syncInvalidIndices, syncMovedIndices } from "../fractionalIndex"; import { syncInvalidIndices, syncMovedIndices } from "../fractionalIndex";
import { getVisibleSceneBounds } from "../element/bounds"; import { getVisibleSceneBounds } from "../element/bounds";

View file

@ -1,6 +1,11 @@
import { pointFrom } from "@excalidraw/math"; import { pointFrom } from "@excalidraw/math";
import { getOriginalContainerHeightFromCache } from "@excalidraw/element/containerCache";
import { queryByText } from "@testing-library/react"; 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 { FONT_FAMILY, TEXT_ALIGN, VERTICAL_ALIGN } from "../constants";
import { Excalidraw } from "../index"; import { Excalidraw } from "../index";
@ -20,13 +25,6 @@ import {
restoreOriginalGetBoundingClientRect, restoreOriginalGetBoundingClientRect,
} from "../tests/test-utils"; } from "../tests/test-utils";
import { getOriginalContainerHeightFromCache } from "./containerCache";
import type {
ExcalidrawTextElement,
ExcalidrawTextElementWithContainer,
} from "./types";
unmountComponent(); unmountComponent();
const tab = " "; 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 { import {
originalContainerCache, originalContainerCache,
updateOriginalContainerCache, updateOriginalContainerCache,
} from "./containerCache"; } from "@excalidraw/element/containerCache";
import { LinearElementEditor } from "./linearElementEditor";
import { bumpVersion, mutateElement } from "./mutateElement"; import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
import { bumpVersion, mutateElement } from "@excalidraw/element/mutateElement";
import { import {
getBoundTextElementId, getBoundTextElementId,
getContainerElement, getContainerElement,
@ -34,22 +15,43 @@ import {
computeContainerDimensionForBoundText, computeContainerDimensionForBoundText,
computeBoundTextPosition, computeBoundTextPosition,
getBoundTextElement, getBoundTextElement,
} from "./textElement"; } from "@excalidraw/element/textElement";
import { getTextWidth } from "./textMeasurements"; import { getTextWidth } from "@excalidraw/element/textMeasurements";
import { normalizeText } from "./textMeasurements"; import { normalizeText } from "@excalidraw/element/textMeasurements";
import { wrapText } from "./textWrapping"; import { wrapText } from "@excalidraw/element/textWrapping";
import { import {
isArrowElement, isArrowElement,
isBoundToContainer, isBoundToContainer,
isTextElement, isTextElement,
} from "./typeChecks"; } from "@excalidraw/element/typeChecks";
import type { import type {
ExcalidrawElement, ExcalidrawElement,
ExcalidrawLinearElement, ExcalidrawLinearElement,
ExcalidrawTextElementWithContainer, ExcalidrawTextElementWithContainer,
ExcalidrawTextElement, 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 App from "../components/App";
import type { AppState } from "../types"; import type { AppState } from "../types";