File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 23112311 var fontDetails = JSROOT . Painter . getFontDetails ( pavetext [ 'fTextFont' ] ) ;
23122312 var lwidth = pavetext [ 'fBorderSize' ] ? pavetext [ 'fBorderSize' ] : 0 ;
23132313
2314- if ( this . main_rect == null ) {
2314+ if ( this . main_rect == null )
23152315 this . main_rect = this . svg_pad ( true ) . append ( "rect" ) ;
2316- } else {
2317- // force main rect of the stat box be last item in the primitives to
2318- // kept it on the top
2319- //var prnt = this.main_rect.node().parentNode;
2320- //prnt.removeChild(this.main_rect.node());
2321- //prnt.appendChild(this.main_rect.node());
2322- }
23232316
23242317 this . main_rect
23252318 . attr ( "x" , pos_x )
23752368 if ( maxlw > width )
23762369 font_size = Math . floor ( font_size * ( width / maxlw ) ) ;
23772370
2378- var stepy = height / nlines ;
2371+ // for characters like 'p' or 'y' several more pixels required to stay in the box when drawn in last line
2372+ var stepy = ( height - 0.2 * font_size ) / nlines ;
23792373
23802374 if ( nlines == 1 ) {
23812375 this . draw_g . append ( "text" )
39663960 var shrink = 0. ;
39673961
39683962 if ( position < 0 ) {
3969- shrink = - position / w + 0.01 ;
3963+ shrink = - position / w + 0.001 ;
39703964 this . shrink_frame_left += shrink ;
39713965 } else
39723966 if ( ( this . shrink_frame_left > 0 ) && ( position / w > this . shrink_frame_left ) ) {
You can’t perform that action at this time.
0 commit comments