File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,10 +191,9 @@ export class Tip extends Mark {
191191 value = "" ;
192192 } else {
193193 const space = label || ( ! value && ! swatch ) ? " " : "" ;
194- const text = clipper ( { monospace, lineWidth : lineWidth - widthof ( label + space ) / 100 , textOverflow} ) ( value ) ;
195- // value is truncated
196- if ( text !== value ) title = value . trim ( ) ;
197- value = space + text ;
194+ const clipped = clipper ( { monospace, lineWidth : lineWidth - widthof ( label + space ) / 100 , textOverflow} ) ( value ) ;
195+ if ( clipped !== value ) title = value . trim ( ) ; // show untruncated value in title
196+ value = space + clipped ;
198197 }
199198 const line = selection . append ( "tspan" ) . attr ( "x" , 0 ) . attr ( "dy" , `${ lineHeight } em` ) . text ( "\u200b" ) ; // zwsp for double-click
200199 if ( label ) line . append ( "tspan" ) . attr ( "font-weight" , "bold" ) . text ( label ) ;
You can’t perform that action at this time.
0 commit comments