Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
jsroot: support new command protocol with web canvas
Improve closing of CEF messaging queue
  • Loading branch information
linev committed Jul 27, 2017
commit b45412c0c9527f86707318f0caddc4517f134b7f
3 changes: 3 additions & 0 deletions etc/http/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
4. Refactor JSROOT scripts structure - extract histograms and hierarchy painters into separate scripts
5. Use latest three.js r86 with improved Projector and CanvasRenderer
Still use own SVGRenderer which supported direct text dump
6. Provide text info when geometry drawing takes too long
7. Preliminary support of TEfficiency
8. Automatic title positioning of vertical axis when fTitleOffset==0


## Changes in 5.2.0
Expand Down
2 changes: 1 addition & 1 deletion etc/http/scripts/JSRootCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
}
} (function(JSROOT) {

JSROOT.version = "dev 26/07/2017";
JSROOT.version = "dev 27/07/2017";

JSROOT.source_dir = "";
JSROOT.source_min = false;
Expand Down
2 changes: 2 additions & 0 deletions etc/http/scripts/JSRootPainter.hierarchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2173,6 +2173,8 @@
if (painter.batch_mode) JSROOT.BatchMode = true;
else JSROOT.RegisterForResize(painter);

if (window) window.onbeforeunload = painter.WindowBeforeUnloadHanlder.bind(painter);

return;
}

Expand Down
21 changes: 16 additions & 5 deletions etc/http/scripts/JSRootPainter.hist.js
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@

shift_y = Math.round(center ? h/2 : (reverse ? h : 0));

this.DrawText((center ? "middle" : (myxor ? "begin" : "end" ))+ ";middle",
this.DrawText((center ? "middle" : (myxor ? "begin" : "end" )) + ";middle",
0, 0, 0, (rotate<0 ? -90 : -270),
axis.fTitle, title_color, 1, title_g);
} else {
Expand All @@ -1328,11 +1328,22 @@
axis.fTitle, title_color, 1, title_g);
}

this.FinishTextDrawing(title_g);
var axis_rect = null;
if (vertical && (axis.fTitleOffset == 0) && ('getBoundingClientRect' in axis_g.node()))
axis_rect = axis_g.node().getBoundingClientRect();

this.FinishTextDrawing(title_g, function() {
if (axis_rect) {
var title_rect = title_g.node().getBoundingClientRect();
shift_x = (side>0) ? Math.round(axis_rect.left - title_rect.right - title_fontsize*0.3) :
Math.round(axis_rect.right - title_rect.left + title_fontsize*0.3);
}

title_g.attr('transform', 'translate(' + shift_x + ',' + shift_y + ')')
.property('shift_x', shift_x)
.property('shift_y', shift_y);
});

title_g.attr('transform', 'translate(' + shift_x + ',' + shift_y + ')')
.property('shift_x',shift_x)
.property('shift_y',shift_y);

this.AddTitleDrag(title_g, vertical, title_offest_k, reverse, vertical ? h : w);
}
Expand Down
Loading