File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,12 +316,10 @@ export const setPadding = (protyle: IProtyle) => {
316316 // https://github.com/siyuan-note/siyuan/issues/15021
317317 protyle . element . style . setProperty ( "--b3-width-protyle" , protyle . element . clientWidth + "px" ) ;
318318 protyle . element . style . setProperty ( "--b3-width-protyle-content" , protyle . contentElement . clientWidth + "px" ) ;
319-
319+ const realWidth = protyle . wysiwyg . element . getAttribute ( "data-realwidth" ) ;
320320 const newWidth = protyle . wysiwyg . element . clientWidth - paddingLeft - paddingRight ;
321321 protyle . wysiwyg . element . setAttribute ( "data-realwidth" , newWidth . toString ( ) ) ;
322322 protyle . element . style . setProperty ( "--b3-width-protyle-wysiwyg" , newWidth . toString ( ) + "px" ) ;
323-
324- const realWidth = protyle . wysiwyg . element . getAttribute ( "data-realwidth" ) ;
325323 return {
326324 width : realWidth ? Math . abs ( parseFloat ( realWidth ) - newWidth ) : 0 ,
327325 } ;
You can’t perform that action at this time.
0 commit comments