mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update textWysiwyg.tsx
This commit is contained in:
parent
6035ebe95f
commit
340b9757c3
1 changed files with 5 additions and 8 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
isBoundToContainer,
|
||||
isTextElement,
|
||||
} from "./typeChecks";
|
||||
import { CLASSES, isFirefox, isSafari, VERTICAL_ALIGN } from "../constants";
|
||||
import { CLASSES, VERTICAL_ALIGN } from "../constants";
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
ExcalidrawLinearElement,
|
||||
|
@ -347,13 +347,10 @@ export const textWysiwyg = ({
|
|||
boxSizing: "content-box",
|
||||
});
|
||||
|
||||
//As Firefox, Safari needs little higher dimensions on DOM
|
||||
const magicOffset =
|
||||
isFirefox || isSafari
|
||||
? (excalidrawContainer
|
||||
? parseFloat(getComputedStyle(excalidrawContainer).fontSize)
|
||||
: 16) / 16
|
||||
: 0;
|
||||
const magicOffset =
|
||||
(excalidrawContainer
|
||||
? parseFloat(getComputedStyle(excalidrawContainer).fontSize)
|
||||
: 16) / 16;
|
||||
|
||||
const onEditableInput = () => {
|
||||
const updatedTextElement = Scene.getScene(element)?.getElement(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue