|
2841 | 2841 |
|
2842 | 2842 | JSROOT.TObjectPainter.prototype.GetShowStatusFunc = function() { |
2843 | 2843 | // return function used to display object status |
2844 | | - // automatically disabled when drawing is enlarged - status line will be inisible |
| 2844 | + // automatically disabled when drawing is enlarged - status line will be invisible |
2845 | 2845 |
|
2846 | 2846 | var pp = this.pad_painter(), res = JSROOT.Painter.ShowStatus; |
2847 | 2847 |
|
|
2879 | 2879 | } |
2880 | 2880 |
|
2881 | 2881 | JSROOT.TObjectPainter.prototype.FindPainterFor = function(selobj,selname,seltype) { |
2882 | | - // try to find painter for sepcified object |
| 2882 | + // try to find painter for specified object |
2883 | 2883 | // can be used to find painter for some special objects, registered as |
2884 | 2884 | // histogram functions |
2885 | 2885 |
|
|
2949 | 2949 | } |
2950 | 2950 |
|
2951 | 2951 | JSROOT.TObjectPainter.prototype.StartTextDrawing = function(font_face, font_size, draw_g, max_font_size) { |
2952 | | - // we need to preserve font to be able rescle at the end |
| 2952 | + // we need to preserve font to be able rescale at the end |
2953 | 2953 |
|
2954 | 2954 | if (!draw_g) draw_g = this.draw_g; |
2955 | 2955 |
|
|
2973 | 2973 | } |
2974 | 2974 |
|
2975 | 2975 | JSROOT.TObjectPainter.prototype.GetBoundarySizes = function(elem) { |
2976 | | - // getBBox does not work in mozilla when object is not displayed or not visisble :( |
| 2976 | + // getBBox does not work in mozilla when object is not displayed or not visible :( |
2977 | 2977 | // getBoundingClientRect() returns wrong sizes for MathJax |
2978 | 2978 | // are there good solution? |
2979 | 2979 |
|
|
3620 | 3620 | hints[n] = null; continue; |
3621 | 3621 | } |
3622 | 3622 |
|
3623 | | - // check if fully duplicated hint already exsits |
| 3623 | + // check if fully duplicated hint already exists |
3624 | 3624 | for (var k=0;k<n;++k) { |
3625 | 3625 | var hprev = hints[k], diff = false; |
3626 | 3626 | if (!hprev || (hprev.lines.length !== hint.lines.length)) continue; |
|
3726 | 3726 | hintsg.selectAll("*").remove(); |
3727 | 3727 | } |
3728 | 3728 |
|
3729 | | - var curry = 10, // normal y coordiante |
3730 | | - gapy = 10, // y coordiante, taking into account all gaps |
| 3729 | + var curry = 10, // normal y coordinate |
| 3730 | + gapy = 10, // y coordinate, taking into account all gaps |
3731 | 3731 | gapminx = -1111, gapmaxx = -1111; |
3732 | 3732 |
|
3733 | 3733 | function FindPosInGap(y) { |
|
4374 | 4374 | JSROOT.TPadPainter = function(pad, iscan) { |
4375 | 4375 | JSROOT.TObjectPainter.call(this, pad); |
4376 | 4376 | this.pad = pad; |
4377 | | - this.iscan = iscan; // indicate if workign with canvas |
| 4377 | + this.iscan = iscan; // indicate if working with canvas |
4378 | 4378 | this.this_pad_name = ""; |
4379 | 4379 | if (!this.iscan && (pad !== null) && ('fName' in pad)) |
4380 | 4380 | this.this_pad_name = pad.fName.replace(" ", "_"); // avoid empty symbol in pad name |
|
4441 | 4441 |
|
4442 | 4442 | this.status_layout = new JSROOT.GridDisplay(footer.node(), 'horizx4_1213'); |
4443 | 4443 |
|
4444 | | - var frame_titles = ['object name','object title','mouse coordiantes','object info']; |
| 4444 | + var frame_titles = ['object name','object title','mouse coordinates','object info']; |
4445 | 4445 | for (var k=0;k<4;++k) |
4446 | 4446 | d3.select(this.status_layout.GetFrame(k)).attr('title', frame_titles[k]).style('overflow','hidden') |
4447 | 4447 | .append("label").attr("class","jsroot_status_label"); |
|
4718 | 4718 | svg_rect.on("contextmenu", this.ShowContextMenu.bind(this)); |
4719 | 4719 |
|
4720 | 4720 | if (!JSROOT.BatchMode) |
4721 | | - svg_rect.attr("pointer-events", "visibleFill") // get events also for not visisble rect |
| 4721 | + svg_rect.attr("pointer-events", "visibleFill") // get events also for not visible rect |
4722 | 4722 | .on("dblclick", this.EnlargePad.bind(this)) |
4723 | 4723 | .on("mouseenter", this.ShowObjectStatus.bind(this)); |
4724 | 4724 |
|
|
4921 | 4921 | showsubitems = this.CreatePadSvg(true); |
4922 | 4922 | } |
4923 | 4923 |
|
4924 | | - // even sub-pad is not visisble, we should redraw sub-sub-pads to hide them as well |
| 4924 | + // even sub-pad is not visible, we should redraw sub-sub-pads to hide them as well |
4925 | 4925 | for (var i = 0; i < this.painters.length; ++i) { |
4926 | 4926 | var sub = this.painters[i]; |
4927 | 4927 | if (showsubitems || sub.this_pad_name) sub.Redraw(resize); |
|
5092 | 5092 | } |
5093 | 5093 |
|
5094 | 5094 | JSROOT.TPadPainter.prototype.RedrawSnap = function(snap, call_back) { |
5095 | | - // for the canvas snapshot constains list of objects |
| 5095 | + // for the canvas snapshot contains list of objects |
5096 | 5096 | // as first entry, graphical properties of canvas itself is provided |
5097 | 5097 | // in ROOT6 it also includes primitives, but we ignore them |
5098 | 5098 |
|
|
5237 | 5237 | // if (((can3d === 1) || (can3d === 2)) && main && main.Render3D) { |
5238 | 5238 | // this was saving of image buffer from 3D render |
5239 | 5239 | // var canvas = main.renderer.domElement; |
5240 | | -// main.Render3D(0); // WebGL clears buffers, therefore we should render scene and convert immedaitely |
| 5240 | +// main.Render3D(0); // WebGL clears buffers, therefore we should render scene and convert immediately |
5241 | 5241 | // var dataUrl = canvas.toDataURL("image/png"); |
5242 | 5242 | // dataUrl.replace("image/png", "image/octet-stream"); |
5243 | 5243 | // var link = document.createElement('a'); |
|
5917 | 5917 | h1 = Math.round(tickSize/2); |
5918 | 5918 |
|
5919 | 5919 | if (handle.kind == 1) { |
5920 | | - // if not showing lables, not show large tick |
| 5920 | + // if not showing labels, not show large tick |
5921 | 5921 | if (!('format' in this) || (this.format(handle.tick,true)!==null)) h1 = tickSize; |
5922 | 5922 | this.ticks.push(handle.grpos); // keep graphical positions of major ticks |
5923 | 5923 | } |
|
6037 | 6037 | .text('\xD7' + JSROOT.Painter.formatExp(Math.pow(10,this.order).toExponential(0))); |
6038 | 6038 |
|
6039 | 6039 | if ((textscale>0) && (textscale<1.)) { |
6040 | | - // rotate X lables if they are too big |
| 6040 | + // rotate X labels if they are too big |
6041 | 6041 | if ((textscale < 0.7) && !vertical && (side>0) && (maxtextlen > 5)) { |
6042 | 6042 | label_g.selectAll("text").each(function() { |
6043 | 6043 | var txt = d3.select(this), x = txt.attr("x"), y = txt.attr("y") - 5; |
|
6821 | 6821 | } |
6822 | 6822 |
|
6823 | 6823 | JSROOT.THistPainter.prototype.CreateXY = function() { |
6824 | | - // here we create x,y objects which maps our physical coordnates into pixels |
| 6824 | + // here we create x,y objects which maps our physical coordinates into pixels |
6825 | 6825 | // while only first painter really need such object, all others just reuse it |
6826 | 6826 | // following functions are introduced |
6827 | 6827 | // this.GetBin[X/Y] return bin coordinate |
|
6953 | 6953 | this.gry = function(val) { return this.y(this.ConvertY(val)); } |
6954 | 6954 | } else |
6955 | 6955 | if (this.logy) { |
6956 | | - // make protecttion for log |
| 6956 | + // make protection for log |
6957 | 6957 | this.gry = function(val) { return (val < this.scale_ymin) ? (this.swap_xy ? -5 : this.y.range()[0]+5) : this.y(val); } |
6958 | 6958 | } else { |
6959 | 6959 | this.gry = this.y; |
|
7200 | 7200 |
|
7201 | 7201 | if (statpainter) { |
7202 | 7202 | statpainter.Enabled = !statpainter.Enabled; |
7203 | | - // when stat box is drawed, it always can be draw individualy while it |
| 7203 | + // when stat box is drawn, it always can be drawn individually while it |
7204 | 7204 | // should be last for colz RedrawPad is used |
7205 | 7205 | statpainter.Redraw(); |
7206 | 7206 | return statpainter.Enabled; |
|
7217 | 7217 | } |
7218 | 7218 |
|
7219 | 7219 | JSROOT.THistPainter.prototype.GetSelectIndex = function(axis, size, add) { |
7220 | | - // be aware - here indexs starts from 0 |
| 7220 | + // be aware - here indexes starts from 0 |
7221 | 7221 | var indx = 0, obj = this.main_painter(); |
7222 | 7222 | if (!obj) obj = this; |
7223 | 7223 | var nbin = this['nbins'+axis]; |
|
7385 | 7385 | function UzoomMinMax(ndim, hist) { |
7386 | 7386 | if (painter.Dimension()!==ndim) return false; |
7387 | 7387 | if ((painter.options.minimum===-1111) && (painter.options.maximum===-1111)) return false; |
7388 | | - if (!painter.draw_content) return false; // if not drawin content, not change min/max |
| 7388 | + if (!painter.draw_content) return false; // if not drawing content, not change min/max |
7389 | 7389 | painter.options.minimum = painter.options.maximum = -1111; |
7390 | 7390 | painter.ScanContent(true); // to reset ymin/ymax |
7391 | 7391 | return true; |
|
7559 | 7559 | } |
7560 | 7560 |
|
7561 | 7561 | JSROOT.THistPainter.prototype.startRectSel = function() { |
7562 | | - // ignore when touch selection is actiavated |
| 7562 | + // ignore when touch selection is activated |
7563 | 7563 |
|
7564 | 7564 | if (this.zoom_kind > 100) return; |
7565 | 7565 |
|
|
8007 | 8007 | this.zoom_kind = 0; // 0 - none, 1 - XY, 2 - only X, 3 - only Y, (+100 for touches) |
8008 | 8008 | this.zoom_rect = null; |
8009 | 8009 | this.zoom_origin = null; // original point where zooming started |
8010 | | - this.zoom_curr = null; // current point for zomming |
| 8010 | + this.zoom_curr = null; // current point for zooming |
8011 | 8011 | this.touch_cnt = 0; |
8012 | 8012 |
|
8013 | 8013 | if (JSROOT.gStyle.Zooming) { |
|
8163 | 8163 | JSROOT.Painter.createMenu(menu_painter, function(menu) { |
8164 | 8164 | var domenu = menu.painter.FillContextMenu(menu, kind, obj); |
8165 | 8165 |
|
8166 | | - // fill frame menu by default - or append frame elements when actiavted in the frame corner |
| 8166 | + // fill frame menu by default - or append frame elements when activated in the frame corner |
8167 | 8167 | if (fp && (!domenu || (frame_corner && (kind!=="frame")))) |
8168 | 8168 | domenu = fp.FillContextMenu(menu); |
8169 | 8169 |
|
8170 | 8170 | if (domenu) |
8171 | 8171 | menu.painter.FillObjectExecMenu(menu, function() { |
8172 | | - // suppress any running zomming |
| 8172 | + // suppress any running zooming |
8173 | 8173 | menu.painter.SwitchTooltip(false); |
8174 | 8174 | menu.show(menu.painter.ctx_menu_evnt, menu.painter.SwitchTooltip.bind(menu.painter, true) ); |
8175 | 8175 | }); |
|
8296 | 8296 | main.tooltip_allowed = !main.tooltip_allowed; |
8297 | 8297 | }); |
8298 | 8298 |
|
8299 | | - menu.addchk(main.enable_hightlight, 'Hightlight bins', function() { |
8300 | | - main.enable_hightlight = !main.enable_hightlight; |
8301 | | - if (!main.enable_hightlight && main.BinHighlight3D) main.BinHighlight3D(null); |
| 8299 | + menu.addchk(main.enable_highlight, 'Highlight bins', function() { |
| 8300 | + main.enable_highlight = !main.enable_highlight; |
| 8301 | + if (!main.enable_highlight && main.BinHighlight3D) main.BinHighlight3D(null); |
8302 | 8302 | }); |
8303 | 8303 |
|
8304 | 8304 | menu.addchk(main.options.FrontBox, 'Front box', function() { |
|
9497 | 9497 | use_pad = true, latex_kind = 0, fact = 1.; |
9498 | 9498 |
|
9499 | 9499 | if (text.TestBit(JSROOT.BIT(14))) { |
9500 | | - // NDC coordiantes |
| 9500 | + // NDC coordinates |
9501 | 9501 | pos_x = pos_x * w; |
9502 | 9502 | pos_y = (1 - pos_y) * h; |
9503 | 9503 | } else |
|
10060 | 10060 |
|
10061 | 10061 | file.ReadObject(itemname, function(obj) { |
10062 | 10062 |
|
10063 | | - // if object was read even when item didnot exist try to reconstruct new hierarchy |
| 10063 | + // if object was read even when item did not exist try to reconstruct new hierarchy |
10064 | 10064 | if ((item==null) && (obj!=null)) { |
10065 | 10065 | // first try to found last read directory |
10066 | 10066 | var d = painter.Find({name:itemname, top:fff, last_exists:true, check_keys:true }); |
|
10198 | 10198 | } |
10199 | 10199 |
|
10200 | 10200 | if (arg.force) { |
10201 | | - // if didnot found element with given name we just generate it |
| 10201 | + // if did not found element with given name we just generate it |
10202 | 10202 | if (top._childs === undefined) top._childs = []; |
10203 | 10203 | pos = fullname.indexOf("/"); |
10204 | 10204 | var child = { _name: ((pos < 0) ? fullname : fullname.substr(0, pos)) }; |
|
11826 | 11826 | if (sett.opts) |
11827 | 11827 | menu.addDrawMenu("nosub:Draw", sett.opts, function(arg) { |
11828 | 11828 | if (!hitem || !hitem._obj) return; |
11829 | | - var obj = hitem._obj, divid = this.divid; // need to remember while many references will be removed (inluding _obj) |
| 11829 | + var obj = hitem._obj, divid = this.divid; // need to remember while many references will be removed (including _obj) |
11830 | 11830 | JSROOT.cleanup(divid); |
11831 | 11831 | JSROOT.draw(divid, obj, arg); |
11832 | 11832 | }); |
@@ -11868,14 +11868,14 @@ |
11868 | 11868 |
|
11869 | 11869 | JSROOT.MDIDisplay.prototype.ForEachFrame = function(userfunc, only_visible) { |
11870 | 11870 | // method dedicated to iterate over existing panels |
11871 | | - // provided userfunc is called with arguemnts (frame) |
| 11871 | + // provided userfunc is called with arguments (frame) |
11872 | 11872 |
|
11873 | 11873 | console.warn("ForEachFrame not implemented in MDIDisplay"); |
11874 | 11874 | } |
11875 | 11875 |
|
11876 | 11876 | JSROOT.MDIDisplay.prototype.ForEachPainter = function(userfunc, only_visible) { |
11877 | 11877 | // method dedicated to iterate over existing panles |
11878 | | - // provided userfunc is called with arguemnts (painter, frame) |
| 11878 | + // provided userfunc is called with arguments (painter, frame) |
11879 | 11879 |
|
11880 | 11880 | this.ForEachFrame(function(frame) { |
11881 | 11881 | var dummy = new JSROOT.TObjectPainter(); |
|
12533 | 12533 | if ((handle.painter_kind === undefined) && (prereq.length > 0)) |
12534 | 12534 | handle.painter_kind = (funcname.indexOf("JSROOT.Painter")==0) ? "object" : "base"; |
12535 | 12535 |
|
12536 | | - // try to find function without prerequisisties |
| 12536 | + // try to find function without prerequisites |
12537 | 12537 | var func = JSROOT.findFunction(funcname); |
12538 | 12538 | if (func) { |
12539 | 12539 | handle.func = func; // remember function once it is found |
|
12554 | 12554 | handle.func = func; // remember function once it found |
12555 | 12555 |
|
12556 | 12556 | if (performDraw() !== painter) |
12557 | | - alert('Painter function ' + funcname + ' do not follow rules of dynamicaly loaded painters'); |
| 12557 | + alert('Painter function ' + funcname + ' do not follow rules of dynamically loaded painters'); |
12558 | 12558 | }); |
12559 | 12559 |
|
12560 | 12560 | return painter; |
|
12606 | 12606 | /** @fn JSROOT.MakeSVG(args, callback) |
12607 | 12607 | * Create SVG for specified args.object and args.option |
12608 | 12608 | * One could provide args.width and args.height as size options. |
12609 | | - * As callback arguemnt one gets SVG code */ |
| 12609 | + * As callback argument one gets SVG code */ |
12610 | 12610 | JSROOT.MakeSVG = function(args, callback) { |
12611 | 12611 |
|
12612 | 12612 | if (!args) args = {}; |
|
12670 | 12670 | } |
12671 | 12671 |
|
12672 | 12672 | // Check resize of drawn element |
12673 | | - // As first argument divid one should use same argment as for the drawing |
| 12673 | + // As first argument divid one should use same argument as for the drawing |
12674 | 12674 | // As second argument, one could specify "true" value to force redrawing of |
12675 | 12675 | // the element even after minimal resize of the element |
12676 | 12676 | // Or one just supply object with exact sizes like { width:300, height:200, force:true }; |
|
0 commit comments