mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 08:36:17 +00:00 
			
		
		
		
	Bug fix for words that overflow their containers
This commit is contained in:
		
							parent
							
								
									fd53b0a1bd
								
							
						
					
					
						commit
						70b9f6f8f6
					
				
							
								
								
									
										1
									
								
								clay.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								clay.h
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -2246,6 +2246,7 @@ void Clay__CalculateFinalLayout() {
 | 
			
		|||
            if (lineLengthChars == 0 && lineWidth + measuredWord->width > containerElement->dimensions.width) {
 | 
			
		||||
                Clay__StringArray_Add(&Clay__wrappedTextLines, CLAY__INIT(Clay_String) {.length = (int)measuredWord->length, .chars = &textElementData->text.chars[measuredWord->startOffset] });
 | 
			
		||||
                textElementData->wrappedLines.length++;
 | 
			
		||||
                wordIndex = measuredWord->next;
 | 
			
		||||
            }
 | 
			
		||||
            // measuredWord->length == 0 means a newline character
 | 
			
		||||
            else if (measuredWord->length == 0 || lineWidth + measuredWord->width > containerElement->dimensions.width) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue