fix text input with no child characters

This commit is contained in:
austin 2022-05-15 18:30:14 -04:00
parent 6d731db5b2
commit 42804cfe3c

View File

@ -159,7 +159,11 @@ public class TextInput implements DrawableElement, FocusableElement, KeyEventEle
} }
} }
if(minX == -1){ if(minX == -1){
minX = 0; if(positionX == 0){
minX = 0;
} else {
minX = positionX;
}
} }
return minX; return minX;
} }
@ -174,7 +178,11 @@ public class TextInput implements DrawableElement, FocusableElement, KeyEventEle
} }
} }
if(minY == -1){ if(minY == -1){
minY = 0; if(positionY == 0){
minY = 0;
} else {
minY = positionY;
}
} }
return minY; return minY;
} }