mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix
This commit is contained in:
parent
f8b25375a4
commit
2ea883a05e
3 changed files with 3 additions and 7 deletions
|
@ -272,10 +272,6 @@ export const textWysiwyg = ({
|
|||
textElementWidth += 0.5;
|
||||
}
|
||||
|
||||
let verticalOffset = 0;
|
||||
if (element.verticalAlign === VERTICAL_ALIGN.BOTTOM) {
|
||||
//verticalOffset = getBoundTextElementOffset(element);
|
||||
}
|
||||
// Make sure text editor height doesn't go beyond viewport
|
||||
const editorMaxHeight =
|
||||
(appState.height - viewportY) / appState.zoom.value;
|
||||
|
@ -286,7 +282,7 @@ export const textWysiwyg = ({
|
|||
width: `${textElementWidth}px`,
|
||||
height: `${textElementHeight}px`,
|
||||
left: `${viewportX}px`,
|
||||
top: `${viewportY + verticalOffset}px`,
|
||||
top: `${viewportY}px`,
|
||||
transform: getTransform(
|
||||
textElementWidth,
|
||||
textElementHeight,
|
||||
|
|
|
@ -263,8 +263,6 @@ const drawElementOnCanvas = (
|
|||
}
|
||||
default: {
|
||||
if (isTextElement(element)) {
|
||||
//context.fillStyle = "pink";
|
||||
//context.fillRect(0, 0, context.canvas.width, context.canvas.height);
|
||||
const rtl = isRTL(element.text);
|
||||
const shouldTemporarilyAttach = rtl && !context.canvas.isConnected;
|
||||
if (shouldTemporarilyAttach) {
|
||||
|
|
|
@ -282,6 +282,7 @@ exports[`restoreElements should restore text element correctly passing value for
|
|||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"baseline": 0,
|
||||
"boundElements": Array [],
|
||||
"containerId": null,
|
||||
"fillStyle": "hachure",
|
||||
|
@ -321,6 +322,7 @@ exports[`restoreElements should restore text element correctly with unknown font
|
|||
Object {
|
||||
"angle": 0,
|
||||
"backgroundColor": "transparent",
|
||||
"baseline": 0,
|
||||
"boundElements": Array [],
|
||||
"containerId": null,
|
||||
"fillStyle": "hachure",
|
||||
|
|
Loading…
Add table
Reference in a new issue