Skip to content

Commit

Permalink
Build with palette fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Nov 25, 2024
1 parent 3b7be4e commit 7e8b669
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -72660,7 +72660,7 @@ class TPavePainter extends ObjectPainter {
if (this.UseContextMenu && settings.ContextMenu)
this.draw_g.on('contextmenu', evnt => this.paveContextMenu(evnt));

if (pt._typename === clTPaletteAxis)
if (this.isPalette())
this.interactivePaletteAxis(width, height);

return this;
Expand All @@ -72670,7 +72670,7 @@ class TPavePainter extends ObjectPainter {
drawBorder(draw_g, width, height, diamond) {
const pt = this.getObject(),
opt = pt.fOption.toUpperCase(),
noborder = opt.indexOf('NB') >= 0,
noborder = this.isPalette() || (opt.indexOf('NB') >= 0),
dx = (opt.indexOf('L') >= 0) ? -1 : ((opt.indexOf('R') >= 0) ? 1 : 0),
dy = (opt.indexOf('T') >= 0) ? -1 : ((opt.indexOf('B') >= 0) ? 1 : 0);

Expand Down Expand Up @@ -73633,6 +73633,11 @@ class TPavePainter extends ObjectPainter {
return this.matchObjectType(clTPaveStats);
}

/** @summary Returns true when stat box is drawn */
isPalette() {
return this.matchObjectType(clTPaletteAxis);
}

/** @summary Returns true when title is drawn */
isTitle() {
return this.matchObjectType(clTPaveText) && (this.getObject()?.fName === kTitle);
Expand Down Expand Up @@ -75302,7 +75307,7 @@ class THistPainter extends ObjectPainter {
}

pt = create$1(clTPaveText);
Object.assign(pt, { fName: kTitle, fFillColor: st.fTitleColor, fFillStyle: st.fTitleStyle, fBorderSize: st.fTitleBorderSize,
Object.assign(pt, { fName: kTitle, fOption: 'blNDC', fFillColor: st.fTitleColor, fFillStyle: st.fTitleStyle, fBorderSize: st.fTitleBorderSize,
fTextFont: st.fTitleFont, fTextSize: st.fTitleFontSize, fTextColor: st.fTitleTextColor, fTextAlign: 22 });

if (draw_title) pt.AddText(histo.fTitle);
Expand Down

0 comments on commit 7e8b669

Please sign in to comment.