Skip to content

Commit 7e5a568

Browse files
committed
Provide simple drawing for TObjString (#164)
1 parent 3a84cf1 commit 7e5a568

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/JSRootPainter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5523,7 +5523,7 @@
55235523
}
55245524

55255525
painter.Draw = function() {
5526-
var txt = this.txt.value;
5526+
var txt = (this.txt._typename && (this.txt._typename == "TObjString")) ? this.txt.fString : this.txt.value;
55275527
if (typeof txt != 'string') txt = "<undefined>";
55285528

55295529
var mathjax = this.txt.mathjax || (JSROOT.gStyle.Latex == 4);
@@ -5641,6 +5641,7 @@
56415641
JSROOT.addDrawFunc({ name: "TWebPainting", icon: "img_graph", prereq: "more2d", func: "JSROOT.Painter.drawWebPainting" });
56425642
JSROOT.addDrawFunc({ name: "TPadWebSnapshot", icon: "img_canvas", func: JSROOT.Painter.drawPadSnapshot });
56435643
JSROOT.addDrawFunc({ name: "kind:Text", icon: "img_text", func: JSROOT.Painter.drawRawText });
5644+
JSROOT.addDrawFunc({ name: "TObjString", icon: "img_text", func: JSROOT.Painter.drawRawText });
56445645
JSROOT.addDrawFunc({ name: "TF1", icon: "img_tf1", prereq: "math;more2d", func: "JSROOT.Painter.drawFunction" });
56455646
JSROOT.addDrawFunc({ name: "TF2", icon: "img_tf2", prereq: "math;hist", func: "JSROOT.Painter.drawTF2" });
56465647
JSROOT.addDrawFunc({ name: "TSpline3", icon: "img_tf1", prereq: "more2d", func: "JSROOT.Painter.drawSpline" });

0 commit comments

Comments
 (0)