Virtual whiteboard for sketching hand-drawn like diagrams
fix: re-introduce wysiwyg width offset (#8014)
Marcel Mrazdc66261c1977
diff --git a/packages/excalidraw/element/textWysiwyg.tsx b/packages/excalidraw/element/textWysiwyg.tsxindex e738e27ee6..15cedc0012 100644--- a/packages/excalidraw/element/textWysiwyg.tsx+++ b/packages/excalidraw/element/textWysiwyg.tsx@@ -226,6 +226,8 @@ export const textWysiwyg = ({if (!container) {maxWidth = (appState.width - 8 - viewportX) / appState.zoom.value;textElementWidth = Math.min(textElementWidth, maxWidth);+ } else {+ textElementWidth += 0.5;}// Make sure text editor height doesn't go beyond viewportdiff --git a/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snapindex 1fd7106bdf..41e9f2b125 100644--- a/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap+++ b/packages/excalidraw/tests/__snapshots__/linearElementEditor.test.tsx.snap@@ -5,7 +5,7 @@ exports[`Test Linear Elements > Test bound text element > should match styles foclass="excalidraw-wysiwyg"data-type="wysiwyg"dir="auto"- style="position: absolute; display: inline-block; min-height: 1em; backface-visibility: hidden; margin: 0px; padding: 0px; border: 0px; outline: 0; resize: none; background: transparent; overflow: hidden; z-index: var(--zIndex-wysiwyg); word-break: break-word; white-space: pre-wrap; overflow-wrap: break-word; box-sizing: content-box; width: 10px; height: 25px; left: 35px; top: 7.5px; transform: translate(0px, 0px) scale(1) rotate(0deg); text-align: center; vertical-align: middle; color: rgb(30, 30, 30); opacity: 1; filter: var(--theme-filter); max-height: 992.5px; font: Emoji 20px 20px; line-height: 1.25; font-family: Virgil, Segoe UI Emoji;"+ style="position: absolute; display: inline-block; min-height: 1em; backface-visibility: hidden; margin: 0px; padding: 0px; border: 0px; outline: 0; resize: none; background: transparent; overflow: hidden; z-index: var(--zIndex-wysiwyg); word-break: break-word; white-space: pre-wrap; overflow-wrap: break-word; box-sizing: content-box; width: 10.5px; height: 25px; left: 35px; top: 7.5px; transform: translate(0px, 0px) scale(1) rotate(0deg); text-align: center; vertical-align: middle; color: rgb(30, 30, 30); opacity: 1; filter: var(--theme-filter); max-height: 992.5px; font: Emoji 20px 20px; line-height: 1.25; font-family: Virgil, Segoe UI Emoji;"tabindex="0"wrap="off"/>