File tree Expand file tree Collapse file tree
packages/webgal/src/Stage/TextBox Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,13 +189,9 @@ export default function IMSSTextbox(props: ITextboxProps) {
189189
190190 const userDataState = useSelector ( ( state : RootState ) => state . userData ) ;
191191 const lineHeightValue = textSizeState === textSize . medium ? 2.2 : 2 ;
192- const MaxTextLine = Number ( userDataState . globalGameVar . Max_line ) ; // config定义字体行数
193- const MaxTextLineHeight = Number ( userDataState . globalGameVar . Max_lineHeight ) ; // config 定义字体行数高度
194- const finalLineHeight = ! Number . isNaN ( MaxTextLine )
195- ? ( Number . isNaN ( MaxTextLineHeight ) ? lineHeightValue : MaxTextLineHeight ) * MaxTextLine
196- : lineHeightValue ; // Max_LineHeight和Max_Line必定为数字,否则使用默认值
197-
198- const lineHeightCssStr = `line-height: ${ finalLineHeight } em` ;
192+ const textLineHeight = userDataState . globalGameVar . LineHeight ;
193+ const finalTextLineHeight = textLineHeight ? Number ( textLineHeight ) : lineHeightValue ;
194+ const lineHeightCssStr = `line-height: ${ finalTextLineHeight } em` ;
199195 const lhCss = css ( lineHeightCssStr ) ;
200196
201197 return (
You can’t perform that action at this time.
0 commit comments