Skip to content

Commit

Permalink
Do not 'expose' new parameter, use only via context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Sep 12, 2024
1 parent cafb70b commit 7de79e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions modules/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,7 @@ settings = {
/** @summary Extra parameters which will be append to the url when item shown in new tab */
NewTabUrlPars: '',
/** @summary Export different settings in output URL */
NewTabUrlExportSettings: false,
/** @summary Custom default draw options for classes like 'TH2:colz;TGraph:al' */
DefaultDrawOptions: ''
NewTabUrlExportSettings: false
},

/** @namespace
Expand Down
2 changes: 1 addition & 1 deletion modules/draw.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ function setDefaultDrawOpt(classname, opt) {
if (!classname)
return;
if ((opt === undefined) && isStr(classname) && (classname.indexOf(':') > 0)) {
// special usage to set list of options like TH2:lego2;TH1:hist
// special usage to set list of options like TH2:lego2;TH3:glbox2
opt.split(';').forEach(part => {
const arr = part.split(':');
if (arr.length >= 1)
Expand Down
2 changes: 1 addition & 1 deletion modules/gui/menu.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ class JSRootMenu {
this.addSelectMenu('Latex', ['Off', 'Symbols', 'Normal', 'MathJax', 'Force MathJax'], settings.Latex, value => { settings.Latex = value; });
this.addSelectMenu('3D rendering', ['Default', 'WebGL', 'Image'], settings.Render3D, value => { settings.Render3D = value; });
this.addSelectMenu('WebGL embeding', ['Default', 'Overlay', 'Embed'], settings.Embed3D, value => { settings.Embed3D = value; });
this.add('Default options', () => this.input('List of options like TH2:lego2;TGraph:l', settings.DefaultDrawOptions).then(v => { settings.DefaultDrawOptions = v; setDefaultDrawOpt(v); }), 'Configure custom default draw options for some classes');
this.add('Default options', () => this.input('List of options like TH2:lego2;TH3:glbox2', settings._dflt_drawopt || '').then(v => { settings._dflt_drawopt = v; setDefaultDrawOpt(v); }), 'Configure custom default draw options for some classes');
this.endsub();

this.sub('Geometry');
Expand Down
2 changes: 1 addition & 1 deletion modules/gui/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ function readSettings(only_check = false, name = 'settings') {
if (!s) return false;
if (!only_check) {
Object.assign(settings, s);
setDefaultDrawOpt(s.DefaultDrawOptions);
setDefaultDrawOpt(s._dflt_drawopt);
}
return true;
}
Expand Down

0 comments on commit 7de79e3

Please sign in to comment.