File tree Expand file tree Collapse file tree
frontend/src/app/annotate/tableau-svg Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ export class TableauNode {
4242 @ViewChild ( 'argsText' )
4343 argsText ?: ElementRef < SVGTextElement > ;
4444
45+ @ViewChild ( 'ruleText' )
46+ ruleText ?: ElementRef < SVGTextElement > ;
47+
4548 @Output ( )
4649 public onSize = new EventEmitter < Dimensions > ( ) ;
4750
@@ -65,12 +68,16 @@ export class TableauNode {
6568 this . headW = this . headText ? this . headText . nativeElement . getComputedTextLength ( ) : 0 ;
6669 this . headX = this . modX + this . modW ;
6770 this . argsX = this . headX + this . headW + this . padding ;
68- this . totalW = (
71+
72+ const mainW = (
6973 this . headText ?
7074 this . argsW + this . idW + this . headW + this . modW :
7175 0
7276 ) ;
7377
78+ const ruleW = this . ruleText ? this . ruleText . nativeElement . getComputedTextLength ( ) : 0 ;
79+ this . totalW = Math . max ( mainW , ruleW )
80+
7481 this . onSize . emit ( { width : this . totalW , height : this . height } ) ;
7582 }
7683
You can’t perform that action at this time.
0 commit comments