mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-25 17:04:40 +02:00 
			
		
		
		
	Revert "floor line height and height when dom height increases than canvas height"
This reverts commit 8de6516823.
			
			
This commit is contained in:
		| @@ -36,7 +36,6 @@ import { | ||||
|   getMaxContainerWidth, | ||||
|   computeContainerDimensionForBoundText, | ||||
|   measureDOMHeight, | ||||
|   getLineHeightInPx, | ||||
|   splitIntoLines, | ||||
| } from "./textElement"; | ||||
| import { | ||||
| @@ -279,19 +278,11 @@ export const textWysiwyg = ({ | ||||
|         getFontString(updatedTextElement), | ||||
|         updatedTextElement.lineHeight, | ||||
|       ); | ||||
|  | ||||
|       let lineHeight = element.lineHeight; | ||||
|       if (isSafari) { | ||||
|         const lineCount = splitIntoLines(element.text).length; | ||||
|         if (domHeight > textElementHeight) { | ||||
|           lineHeight = (Math.floor(element.lineHeight * element.fontSize) / | ||||
|             element.fontSize) as ExcalidrawTextElement["lineHeight"]; | ||||
|           textElementHeight = | ||||
|             getLineHeightInPx(element.fontSize, lineHeight) * lineCount; | ||||
|           mutateElement(updatedTextElement, { | ||||
|             lineHeight, | ||||
|             height: textElementHeight, | ||||
|           }); | ||||
|         } | ||||
|       if (isSafari && domHeight > textElementHeight) { | ||||
|         lineHeight = (Math.floor(element.lineHeight * element.fontSize) / | ||||
|           element.fontSize) as ExcalidrawTextElement["lineHeight"]; | ||||
|       } | ||||
|  | ||||
|       // Make sure text editor height doesn't go beyond viewport | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aakansha Doshi
					Aakansha Doshi