Skip to content

Commit 202415b

Browse files
committed
Sync frame v6 and v7 methods -
Otherwise ROOT6 objects cannot be correctly displayed on ROOT7 canvas
1 parent e30183d commit 202415b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

scripts/JSRootCore.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@
9595

9696
"use strict";
9797

98-
JSROOT.version = "dev 4/10/2019";
98+
JSROOT.version = "dev 9/10/2019";
9999

100100
JSROOT.source_dir = "";
101101
JSROOT.source_min = false;
102102
JSROOT.source_fullpath = ""; // full name of source script
103103
JSROOT.bower_dir = null; // when specified, use standard libs from bower location
104104
JSROOT.nocache = false; // when specified, used as extra URL parameter to load JSROOT scripts
105-
JSROOT.wrong_http_response_handling = false; // wehn configured, try to handle wrong content-length response from server
105+
JSROOT.wrong_http_response_handling = false; // when configured, try to handle wrong content-length response from server
106106
JSROOT.sources = ['core']; // indicates which major sources were loaded
107107

108108
JSROOT.id_counter = 1; // avoid id value 0, starts from 1
@@ -168,7 +168,7 @@
168168
FrameNDC: { fX1NDC: 0.07, fY1NDC: 0.12, fX2NDC: 0.95, fY2NDC: 0.88 },
169169
Palette: 57,
170170
Latex: 2, // 0 - never, 1 - only latex symbols, 2 - normal TLatex processing (default), 3 - use MathJax for complex case, 4 - use MathJax always
171-
// MathJax : 0, // depricated, will be supported till JSROOT 6.0, use Latex variable 0 - never, 1 - only for complex cases, 2 - always
171+
// MathJax : 0, // deprecated, will be supported till JSROOT 6.0, use Latex variable 0 - never, 1 - only for complex cases, 2 - always
172172
ProgressBox: true, // show progress box
173173
Embed3DinSVG: 2, // 0 - no embed, only 3D plot, 1 - overlay over SVG (IE/WebKit), 2 - embed into SVG (only Firefox)
174174
ImageSVG: !JSROOT.nodejs, // when producing SVG images, use <image> elements to insert 3D drawings from three.js,

scripts/JSRootPainter.v6.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,7 @@
15301530
this.axes_drawn = false;
15311531
}
15321532

1533+
/** Returns frame rectangle plus extra info for hint display */
15331534
TFramePainter.prototype.CleanFrameDrawings = function() {
15341535

15351536
// cleanup all 3D drawings if any

scripts/JSRootPainter.v7.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,8 @@
12401240
this.axes_drawn = false;
12411241
}
12421242

1243-
TFramePainter.prototype.CleanDrawings = function() {
1243+
/** Removes all drawn elements of the frame @private */
1244+
TFramePainter.prototype.CleanFrameDrawings = function() {
12441245
// cleanup all 3D drawings if any
12451246
if (typeof this.Create3DScene === 'function')
12461247
this.Create3DScene(-1);
@@ -1268,7 +1269,7 @@
12681269

12691270
TFramePainter.prototype.Cleanup = function() {
12701271

1271-
this.CleanDrawings();
1272+
this.CleanFrameDrawings();
12721273

12731274
if (this.draw_g) {
12741275
this.draw_g.selectAll("*").remove();
@@ -1430,9 +1431,8 @@
14301431
setTimeout(this.ProcessTooltipEvent.bind(this, hintsg.property('last_point')), 10);
14311432
}
14321433

1434+
/** Returns frame rectangle plus extra info for hint display */
14331435
TFramePainter.prototype.GetFrameRect = function() {
1434-
// returns frame rectangle plus extra info for hint display
1435-
14361436
return {
14371437
x: this.frame_x(),
14381438
y: this.frame_y(),
@@ -1444,9 +1444,9 @@
14441444
}
14451445
}
14461446

1447+
/** Function called when frame is clicked and object selection can be performed
1448+
* such event can be used to select objects */
14471449
TFramePainter.prototype.ProcessFrameClick = function(pnt, dblckick) {
1448-
// function called when frame is clicked and object selection can be performed
1449-
// such event can be used to select
14501450

14511451
var pp = this.pad_painter();
14521452
if (!pp) return;
@@ -3382,7 +3382,7 @@
33823382
this.painters = [];
33833383
if (fp) {
33843384
this.painters.push(fp);
3385-
fp.CleanDrawings();
3385+
fp.CleanFrameDrawings();
33863386
}
33873387
this.RemoveButtons();
33883388
this.AddOnlineButtons();

0 commit comments

Comments
 (0)