File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
services/static-webserver/client/source/class/osparc/ui/markdown Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ qx.Class.define("osparc.ui.markdown.Markdown2", {
152152 // collapse first so we don't re-measure an old minHeight
153153 this . setHeight ( null ) ;
154154 this . setMinHeight ( 0 ) ;
155+ this . setWidth ( null ) ;
156+ this . setMinWidth ( 0 ) ;
155157
156158 window . requestAnimationFrame ( ( ) => {
157159 // force reflow
@@ -161,14 +163,19 @@ qx.Class.define("osparc.ui.markdown.Markdown2", {
161163 const inner = domElement . querySelector ( "." + this . self ( ) . WRAP_CLASS ) || domElement ;
162164 const rect = inner . getBoundingClientRect ( ) ;
163165 const contentH = Math . ceil ( rect ? rect . height : 0 ) ;
166+ const contentW = Math . ceil ( rect ? rect . width : 0 ) ;
164167
165168 // include widget insets (decorator/padding/border)
166169 const insets = this . getInsets ? this . getInsets ( ) : { top : 0 , bottom : 0 } ;
167170 const totalH = Math . max ( 0 , contentH + ( insets . top || 0 ) + ( insets . bottom || 0 ) ) ;
171+ const totalW = Math . max ( 0 , contentW + ( insets . left || 0 ) + ( insets . right || 0 ) ) ;
168172
169173 this . setMinHeight ( totalH ) ;
170174 this . setHeight ( totalH ) ;
171- console . log ( "totalH" , totalH ) ;
175+ this . setMinWidth ( totalW ) ;
176+ this . setWidth ( totalW ) ;
177+
178+ console . log ( "height" , totalH , "width" , totalW ) ;
172179
173180 this . fireEvent ( "resized" ) ;
174181 } ) ;
You can’t perform that action at this time.
0 commit comments