Преглед изворни кода

fix: WYSIWYG editor padding is not normalized with zoom.value (#8481)

zsviczian пре 1 година
родитељ
комит
60e3801691
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/excalidraw/element/textWysiwyg.tsx

+ 1 - 1
packages/excalidraw/element/textWysiwyg.tsx

@@ -247,7 +247,7 @@ export const textWysiwyg = ({
 
 
       // adding left and right padding buffer, so that browser does not cut the glyphs (does not work in Safari)
       // adding left and right padding buffer, so that browser does not cut the glyphs (does not work in Safari)
       const padding = !isSafari
       const padding = !isSafari
-        ? Math.ceil(updatedTextElement.fontSize / 2)
+        ? Math.ceil(updatedTextElement.fontSize / appState.zoom.value / 2)
         : 0;
         : 0;
 
 
       // Make sure text editor height doesn't go beyond viewport
       // Make sure text editor height doesn't go beyond viewport