Skip to content

Commit 7a2e767

Browse files
committed
Marking methods as private which should be private
1 parent 43559a8 commit 7a2e767

File tree

8 files changed

+38
-20
lines changed

8 files changed

+38
-20
lines changed

modules/base/BasePainter.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ function getAbsPosInCanvas(sel, pos) {
6464
* @param {number} value - value to convert
6565
* @param {string} [fmt="6.4g"] - format can be like 5.4g or 4.2e or 6.4f
6666
* @param {boolean} [ret_fmt] - when true returns array with value and actual format like ["0.1","6.4f"]
67-
* @returns {string|Array} - converted value or array with value and actual format */
67+
* @returns {string|Array} - converted value or array with value and actual format
68+
* @private */
6869
function floatToString(value, fmt, ret_fmt) {
6970
if (!fmt) fmt = "6.4g";
7071

modules/base/colors.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ function toHex(num,scale) {
55
return s.length == 1 ? '0'+s : s;
66
}
77

8-
/** @summary list of global root colors */
8+
/** @summary list of global root colors
9+
* @private */
910
let gbl_colors_list = [];
1011

1112
/** @summary Generates all root colors, used also in jstests to reset colors
@@ -106,7 +107,8 @@ function adoptRootColors(objarr) {
106107

107108
/** @summary Return ROOT color by index
108109
* @desc Color numbering corresponds typical ROOT colors
109-
* @returns {String} with RGB color code or existing color name like 'cyan' */
110+
* @returns {String} with RGB color code or existing color name like 'cyan'
111+
* @private */
110112
function getColor(indx) {
111113
return gbl_colors_list[indx];
112114
}

modules/core.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ function getDocument() {
353353

354354
/** @summary Inject javascript code
355355
* @desc Replacement for eval
356-
* @returns {Promise} */
356+
* @returns {Promise}
357+
* @private */
357358
function injectCode(code) {
358359
if (nodejs) {
359360
let name, fs;
@@ -785,7 +786,8 @@ function decodeUrl(url) {
785786
return res;
786787
}
787788

788-
/** @summary Find function with given name */
789+
/** @summary Find function with given name
790+
* @private */
789791
function findFunction(name) {
790792
if (typeof name === 'function') return name;
791793
if (typeof name !== 'string') return null;
@@ -922,9 +924,10 @@ function httpRequest(url, kind, post_data) {
922924
}
923925

924926
/** @summary Create some ROOT classes
925-
* @desc Supported classes: "TObject", "TNamed", "TList", "TAxis", "TLine", "TText", "TLatex", "TPad", "TCanvas"
927+
* @desc Supported classes: `TObject`, `TNamed`, `TList`, `TAxis`, `TLine`, `TText`, `TLatex`, `TPad`, `TCanvas`
926928
* @param {string} typename - ROOT class name
927929
* @example
930+
* import { create } from 'path_to_jsroot/modules/core.mjs';
928931
* let obj = create("TNamed");
929932
* obj.fName = "name";
930933
* obj.fTitle = "title"; */

modules/geom/csg.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,8 @@ class Geometry {
769769

770770
} // class Geometry
771771

772-
/** @summary create geometry to make cut on specified axis */
772+
/** @summary create geometry to make cut on specified axis
773+
* @private */
773774
function createNormal(axis_name, pos, size) {
774775
if (!size || (size < 10000)) size = 10000;
775776

modules/gpad/TCanvasPainter.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import { TPadPainter } from './TPadPainter.mjs';
1818

1919

2020
/** @summary direct draw of TFrame object,
21-
* @desc pad or canvas should already exist */
21+
* @desc pad or canvas should already exist
22+
* @private */
2223
function directDrawTFrame(dom, obj, opt) {
2324
let fp = new TFramePainter(dom, obj);
2425
fp.addToPadPrimitives();
@@ -741,7 +742,8 @@ function drawTPadSnapshot(dom, snap /*, opt*/) {
741742
});
742743
}
743744

744-
/** @summary draw TGaxis object */
745+
/** @summary draw TGaxis object
746+
* @private */
745747
function drawTGaxis(dom, obj, opt) {
746748
let painter = new TAxisPainter(dom, obj, false);
747749
painter.disable_zooming = true;
@@ -751,7 +753,8 @@ function drawTGaxis(dom, obj, opt) {
751753
}).then(() => painter);
752754
}
753755

754-
/** @summary draw TGaxis object */
756+
/** @summary draw TGaxis object
757+
* @private */
755758
function drawTFrame(dom, obj, opt) {
756759
let fp = new TFramePainter(dom, obj);
757760
return ensureTCanvas(fp, false).then(() => {

modules/gui/utils.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ function addMoveHandler(painter, enabled) {
342342
}
343343

344344
/** @summary Inject style
345-
* @param {String} code - css string */
345+
* @param {String} code - css string
346+
* @private */
346347
function injectStyle(code, node) {
347348
if (isBatchMode() || !code || (typeof document === 'undefined'))
348349
return true;

modules/io.mjs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const clTObject = 'TObject', clTNamed = 'TNamed', clTObjString = 'TObjString', c
4848
/** @summary Custom streamers for root classes
4949
* @desc map of user-streamer function like func(buf,obj)
5050
* or alias (classname) which can be used to read that function
51-
* or list of read functions */
51+
* or list of read functions
52+
* @private */
5253
const CustomStreamers = {
5354
TObject(buf, obj) {
5455
obj.fUniqueID = buf.ntou4();
@@ -482,8 +483,9 @@ function addUserStreamer(type, user_streamer) {
482483
}
483484

484485

485-
/** @summary these are streamers which do not handle version regularly
486-
* @desc used for special classes like TRef or TBasket */
486+
/** @summary these are streamers which do not handle version regularly
487+
* @desc used for special classes like TRef or TBasket
488+
* @private */
487489
const DirectStreamers = {
488490
// do nothing for these classes
489491
TQObject() {},
@@ -3072,9 +3074,9 @@ class TFile {
30723074
* @param {number} [cycle] - cycle number, also can be included in obj_name
30733075
* @returns {Promise} promise with object read
30743076
* @example
3075-
* let f = await openFile("https://root.cern/js/files/hsimple.root");
3076-
* let obj = await f.readObject("hpxpy;1");
3077-
* console.log(`Read object of type ${obj._typename}`); */
3077+
* let f = await openFile("https://root.cern/js/files/hsimple.root");
3078+
* let obj = await f.readObject("hpxpy;1");
3079+
* console.log(`Read object of type ${obj._typename}`); */
30783080
readObject(obj_name, cycle, only_dir) {
30793081

30803082
let pos = obj_name.lastIndexOf(";");
@@ -3738,6 +3740,8 @@ class TNodejsFile extends TFile {
37383740
* @param {string|object} arg - argument for file open like url, see details
37393741
* @returns {object} - Promise with {@link TFile} instance when file is opened
37403742
* @example
3743+
*
3744+
* import { openFile } from '/path_to_jsroot/modules/io.mjs';
37413745
* let f = await openFile("https://root.cern/js/files/hsimple.root");
37423746
* console.log(`Open file ${f.getFileName()}`); */
37433747
function openFile(arg) {

modules/tree.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ function getBranchObjectClass(branch, tree, with_clones = false, with_leafs = fa
286286

287287
/** @summary Get branch with specified id
288288
* @desc All sub-branches checked as well
289-
* @returns {Object} branch */
289+
* @returns {Object} branch
290+
* @private */
290291
function getTreeBranch(tree, id) {
291292
if (!Number.isInteger(id)) return;
292293
let res, seq = 0;
@@ -368,7 +369,8 @@ function findBranchComplex(tree, name, lst = undefined, only_search = false) {
368369

369370
/** @summary Search branch with specified name
370371
* @param {string} name - name of the branch
371-
* @returns {Object} found branch */
372+
* @returns {Object} found branch
373+
* @private */
372374
function findBranch(tree, name) {
373375
let res = findBranchComplex(tree, name, tree.fBranches, true);
374376
return (!res || (res.rest.length > 0)) ? null : res.branch;
@@ -377,7 +379,8 @@ function findBranch(tree, name) {
377379

378380
/** @summary Returns number of branches in the TTree
379381
* @desc Checks also sub-branches in the branches
380-
* @returns {number} number of branches */
382+
* @returns {number} number of branches
383+
* @private */
381384
function getNumBranches(tree) {
382385
function count(obj) {
383386
if (!obj || !obj.fBranches) return 0;

0 commit comments

Comments
 (0)