Skip to content

Commit 5040929

Browse files
committed
Fix bug with layou selection
1 parent 528861f commit 5040929

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/JSRootInterface.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
}
4040

4141
guiLayout = function() {
42-
var selects = document.getElementById("layout");
42+
var selects = document.getElementById("gui_layout");
4343
return selects ? selects.options[selects.selectedIndex].text : 'collapsible';
4444
}
4545

4646
setGuiLayout = function(value) {
47-
var selects = document.getElementById("layout");
47+
var selects = document.getElementById("gui_layout");
4848
if (!selects) return;
4949

5050
for (var i in selects.options) {
@@ -106,7 +106,7 @@
106106
+ "<p><font face='Verdana' size='1px'><a href='https://github.com/linev/jsroot'>JSROOT</a> version <span style='color:green'><b>" + JSROOT.version + "</b></span></font></p>"
107107
+ '<p> Hierarchy in <a href="h.json">json</a> and <a href="h.xml">xml</a> format</p>'
108108
+ ' <input type="checkbox" name="monitoring" id="monitoring"/> Monitoring '
109-
+ ' <select style="padding:2px; margin-left:10px; margin-top:5px;" id="layout">'
109+
+ ' <select style="padding:2px; margin-left:10px; margin-top:5px;" id="gui_layout">'
110110
+ ' <option>simple</option><option>collapsible</option><option>flex</option><option>tabs</option><option>grid 1x2</option><option>grid 2x2</option><option>grid 1x3</option><option>grid 2x3</option><option>grid 3x3</option><option>grid 4x4</option>'
111111
+ ' </select>';
112112
} else {
@@ -136,12 +136,12 @@
136136
+' onclick="ReadSelectedFile()" type="button" title="Read the Selected File" value="Load"/>'
137137
+'<input style="padding:2px; margin-left:10px;"'
138138
+' onclick="ResetUI()" type="button" title="Clear All" value="Reset"/>'
139-
+'<select style="padding:2px; margin-left:10px; margin-top:5px;" title="layout kind" id="layout">'
139+
+'<select style="padding:2px; margin-left:10px; margin-top:5px;" title="layout kind" id="gui_layout">'
140140
+' <option>simple</option><option>collapsible</option><option>flex</option><option>tabs</option><option>grid 1x2</option><option>grid 2x2</option><option>grid 1x3</option><option>grid 2x3</option><option>grid 3x3</option><option>grid 4x4</option>'
141141
+'</select><br/>';
142142
} else
143143
if (noselect === "file") {
144-
guiCode += '<select style="padding:2px; margin-left:5px; margin-top:5px;" title="layout kind" id="layout">'
144+
guiCode += '<select style="padding:2px; margin-left:5px; margin-top:5px;" title="layout kind" id="gui_layout">'
145145
+ ' <option>simple</option><option>collapsible</option><option>flex</option><option>tabs</option><option>grid 1x2</option><option>grid 2x2</option><option>grid 1x3</option><option>grid 2x3</option><option>grid 3x3</option><option>grid 4x4</option>'
146146
+ '</select><br/>';
147147
}
@@ -194,7 +194,7 @@
194194

195195
// specify display kind every time selection done
196196
// will be actually used only for first drawing or after reset
197-
$("#layout").change(function() {
197+
$("#gui_layout").change(function() {
198198
if (hpainter) hpainter.SetDisplay(guiLayout(), drawDivId);
199199
});
200200

scripts/JSRootPainter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10355,7 +10355,7 @@
1035510355
this.disp_kind = 'custom';
1035610356
this.disp_frameid = null;
1035710357
} else {
10358-
this.disp_kind = layout || "simple";
10358+
this.disp_kind = layout;
1035910359
this.disp_frameid = frameid;
1036010360
}
1036110361

0 commit comments

Comments
 (0)