Skip to content

Commit a996f38

Browse files
committed
Merge branch 'master' of https://github.com/root-project/jsroot
2 parents 0027123 + 0a244d2 commit a996f38

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Changes in 5.1.x
44
1. Fix - support newest TFormula in TF1 (#127)
55
2. Fix - ignore NaN value in saved TF1 buffer
6+
3. Fix - correctly treat transparancy in geo painter
67

78

89
## Changes in 5.1.1

scripts/JSRootGeoBase.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,6 +2910,7 @@
29102910
JSROOT.GEO.ClonedNodes = function(obj, clones) {
29112911
this.toplevel = true; // indicate if object creates top-level structure with Nodes and Volumes folder
29122912
this.name_prefix = ""; // name prefix used for nodes names
2913+
this.maxdepth = 1; // maximal hierarchy depth, required for transparancy
29132914

29142915
if (obj) {
29152916
if (obj.$geoh) this.toplevel = false;
@@ -2970,6 +2971,7 @@
29702971

29712972
obj._refid = this.origin.length;
29722973
this.origin.push(obj);
2974+
if (sublevel>this.maxdepth) this.maxdepth = sublevel;
29732975

29742976
var chlds = null;
29752977
if (kind===0)

scripts/JSRootGeoPainter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,7 @@
11791179

11801180
// keep full stack of nodes
11811181
mesh.stack = entry.stack;
1182+
mesh.renderOrder = this._clones.maxdepth - entry.stack.length; // order of transparancy handling
11821183

11831184
obj3d.add(mesh);
11841185

scripts/JSRootPainter.jquery.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,10 @@
818818
var jmain = $("#"+this.gui_div+" .jsroot_browser"), top = 7, left = 7;
819819

820820
if (this.browser_visible) {
821-
var area = jmain.find(".jsroot_browser_area");
822-
top = area.offset().top + 7;
823-
left = area.offset().left + area.innerWidth() - 27;
821+
var area = jmain.find(".jsroot_browser_area"),
822+
off0 = jmain.offset(), off1 = area.offset();
823+
top = off1.top - off0.top + 7;
824+
left = off1.left - off0.left + area.innerWidth() - 27;
824825
}
825826

826827
jmain.find(".jsroot_browser_btns")

0 commit comments

Comments
 (0)