Skip to content

Commit

Permalink
Build with tgraph changes
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Sep 18, 2024
1 parent de5e082 commit b960d91
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -68534,7 +68534,7 @@ class TAxisPainter extends ObjectPainter {
.style('cursor', 'crosshair');

if (this.vertical) {
const rw = (labelsMaxWidth || 2*labelSize) + 3;
const rw = Math.max(labelsMaxWidth, 2*labelSize) + 3;
r.attr('x', (side > 0) ? -rw : 0).attr('y', 0)
.attr('width', rw).attr('height', h);
} else {
Expand Down Expand Up @@ -109570,6 +109570,11 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
let uxmin = xmin - dx, uxmax = xmax + dx,
minimum = ymin - dy, maximum = ymax + dy;

if ((ymin > 0) && (minimum <= 0))
minimum = (1 - margin) * ymin;
if ((ymax < 0) && (maximum >= 0))
maximum = (1 - margin) * ymax;

if (!this._not_adjust_hrange) {
const pad_logx = this.getPadPainter()?.getPadLog('x');

Expand All @@ -109595,7 +109600,10 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {

if (graph.fMinimum !== kNoZoom) minimum = ymin = graph.fMinimum;
if (graph.fMaximum !== kNoZoom) maximum = graph.fMaximum;
if ((minimum < 0) && (ymin >= 0)) minimum = (1 - margin)*ymin;
if ((minimum < 0) && (ymin >= 0))
minimum = (1 - margin)*ymin;
if ((ymax < 0) && (maximum >= 0))
maximum = (1 - margin) * ymax;

setHistogramTitle(histo, this.getObject().fTitle);

Expand Down Expand Up @@ -109779,6 +109787,9 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
if (!graph?.fNpoints) return;

let excl_width = 0, drawbins = null;
// if markers or errors drawn - no need handle events for line drawing
// this improves interactivity like zooming around graph points
const line_events_handling = !this.isBatchMode() && (options.Line || options.Errors) ? 'none' : null;

if (main_block && lineatt.excl_side) {
excl_width = lineatt.excl_width;
Expand Down Expand Up @@ -109842,7 +109853,9 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
if (excl_width)
this.appendExclusion(false, path, drawbins, excl_width);

const elem = draw_g.append('svg:path').attr('d', path + close_symbol);
const elem = draw_g.append('svg:path')
.attr('d', path + close_symbol)
.style('pointer-events', line_events_handling);
if (options.Line)
elem.call(lineatt.func);

Expand Down Expand Up @@ -109873,7 +109886,8 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
draw_g.append('svg:path')
.attr('d', path)
.call(lineatt.func)
.style('fill', 'none');
.style('fill', 'none')
.style('pointer-events', line_events_handling);
if (main_block)
this.draw_kind = 'lines'; // handled same way as lines
}
Expand Down Expand Up @@ -115010,10 +115024,10 @@ class TLinePainter extends ObjectPainter {

/** @summary Redraw line */
redraw() {
this.createG(this.use_frame ? 'frame2d' : undefined);

this.prepareDraw();

this.createG(this.use_frame ? 'frame2d' : undefined);

const elem = this.draw_g.append('svg:path')
.attr('d', this.createPath())
.call(this.lineatt.func);
Expand Down

0 comments on commit b960d91

Please sign in to comment.