Skip to content

Commit b19e696

Browse files
committed
date and adjust graph painter comments
1 parent de9404b commit b19e696

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

scripts/JSRoot.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104

105105
/** @summary JSROOT version date
106106
* @desc Release date in format day/month/year like "14/01/2021"*/
107-
JSROOT.version_date = "17/11/2021";
107+
JSROOT.version_date = "19/11/2021";
108108

109109
/** @summary JSROOT version id and date
110110
* @desc Produced by concatenation of {@link JSROOT.version_id} and {@link JSROOT.version_date}

scripts/JSRoot.more.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,6 @@ JSROOT.define(['d3', 'painter', 'math', 'gpad'], (d3, jsrp) => {
13401340

13411341
this.draw_kind = "nodes";
13421342

1343-
// here are up to five elements are collected, try to group them
13441343
nodes = this.draw_g.selectAll(".grpoint")
13451344
.data(drawbins)
13461345
.enter()
@@ -1456,7 +1455,7 @@ JSROOT.define(['d3', 'painter', 'math', 'gpad'], (d3, jsrp) => {
14561455
}
14571456

14581457
if (this.options.Mark) {
1459-
// for tooltips use markers only if nodes where not created
1458+
// for tooltips use markers only if nodes were not created
14601459
let path = "", pnt, grx, gry;
14611460

14621461
this.createAttMarker({ attr: graph, style: this.options.Mark - 100 });
@@ -1487,8 +1486,8 @@ JSROOT.define(['d3', 'painter', 'math', 'gpad'], (d3, jsrp) => {
14871486
this.draw_g.append("svg:path")
14881487
.attr("d", path)
14891488
.call(this.markeratt.func);
1490-
if ((nodes===null) && (this.draw_kind=="none"))
1491-
this.draw_kind = (this.options.Mark==101) ? "path" : "mark";
1489+
if ((nodes===null) && (this.draw_kind == "none"))
1490+
this.draw_kind = (this.options.Mark == 101) ? "path" : "mark";
14921491

14931492
}
14941493
}
@@ -1618,7 +1617,7 @@ JSROOT.define(['d3', 'painter', 'math', 'gpad'], (d3, jsrp) => {
16181617
TGraphPainter.prototype.findBestBin = function(pnt) {
16191618
if (!this.bins) return null;
16201619

1621-
let islines = (this.draw_kind=="lines"),
1620+
let islines = (this.draw_kind == "lines"),
16221621
bestindx = -1,
16231622
bestbin = null,
16241623
bestdist = 1e10,
@@ -1659,11 +1658,9 @@ JSROOT.define(['d3', 'painter', 'math', 'gpad'], (d3, jsrp) => {
16591658

16601659
if (!bestbin && islines) {
16611660

1662-
bestdist = 10000;
1661+
bestdist = 1e10;
16631662

1664-
function IsInside(x, x1, x2) {
1665-
return ((x1>=x) && (x>=x2)) || ((x1<=x) && (x<=x2));
1666-
}
1663+
const IsInside = (x, x1, x2) => ((x1>=x) && (x>=x2)) || ((x1<=x) && (x<=x2));
16671664

16681665
let bin0 = this.bins[0], grx0 = funcs.grx(bin0.x), gry0, posy = 0;
16691666
for (n = 1; n < this.bins.length; ++n) {

0 commit comments

Comments
 (0)