@@ -12,7 +12,7 @@ const version_id = 'dev',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '16 /05/2025',
15
+ version_date = '19 /05/2025',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -96813,10 +96813,21 @@ let TH2Painter$2 = class TH2Painter extends THistPainter {
96813
96813
const main = this.getMainPainter(),
96814
96814
fp = this.getFramePainter();
96815
96815
96816
- if ((main !== this) && fp && (fp.mode3d !== this.options.Mode3D))
96817
- this.copyOptionsFrom(main);
96816
+ if ((main !== this) && fp && (fp.mode3d !== this.options.Mode3D))
96817
+ this.copyOptionsFrom(main);
96818
96818
96819
- return this.options.Mode3D ? this.draw3D(reason) : this.draw2D(reason);
96819
+ if (!this.options.Mode3D)
96820
+ return this.draw2D(reason);
96821
+
96822
+ return this.draw3D(reason).catch(err => {
96823
+ const cp = this.getCanvPainter();
96824
+ if (isFunc(cp?.showConsoleError))
96825
+ cp.showConsoleError(err);
96826
+ else
96827
+ console.error('Fail to draw histogram in 3D - back to 2D');
96828
+ this.options.Mode3D = false;
96829
+ return this.draw2D(reason);
96830
+ });
96820
96831
}
96821
96832
96822
96833
/** @summary Redraw histogram */
@@ -100622,17 +100633,6 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
100622
100633
return false;
100623
100634
}
100624
100635
100625
- /** @summary Call drawing function depending from 3D mode */
100626
- async callDrawFunc(reason) {
100627
- const main = this.getMainPainter(),
100628
- fp = this.getFramePainter();
100629
-
100630
- if ((main !== this) && fp && (fp.mode3d !== this.options.Mode3D))
100631
- this.copyOptionsFrom(main);
100632
-
100633
- return this.options.Mode3D ? this.draw3D(reason) : this.draw2D(reason);
100634
- }
100635
-
100636
100636
/** @summary Performs 2D drawing of histogram
100637
100637
* @return {Promise} when ready */
100638
100638
async draw2D(reason) {
@@ -100660,6 +100660,28 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
100660
100660
return this.draw2D(reason);
100661
100661
}
100662
100662
100663
+ /** @summary Call drawing function depending from 3D mode */
100664
+ async callDrawFunc(reason) {
100665
+ const main = this.getMainPainter(),
100666
+ fp = this.getFramePainter();
100667
+
100668
+ if ((main !== this) && fp && (fp.mode3d !== this.options.Mode3D))
100669
+ this.copyOptionsFrom(main);
100670
+
100671
+ if (!this.options.Mode3D)
100672
+ return this.draw2D(reason);
100673
+
100674
+ return this.draw3D(reason).catch(err => {
100675
+ const cp = this.getCanvPainter();
100676
+ if (isFunc(cp?.showConsoleError))
100677
+ cp.showConsoleError(err);
100678
+ else
100679
+ console.error('Fail to draw histogram in 3D - back to 2D');
100680
+ this.options.Mode3D = false;
100681
+ return this.draw2D(reason);
100682
+ });
100683
+ }
100684
+
100663
100685
/** @summary Redraw histogram */
100664
100686
redraw(reason) {
100665
100687
return this.callDrawFunc(reason);
@@ -100678,7 +100700,7 @@ let TH1Painter$2 = class TH1Painter extends THistPainter {
100678
100700
class TH1Painter extends TH1Painter$2 {
100679
100701
100680
100702
/** @summary draw TH1 object in 3D mode */
100681
- draw3D(reason) {
100703
+ async draw3D(reason) {
100682
100704
this.mode3d = true;
100683
100705
100684
100706
const fp = this.getFramePainter(), // who makes axis drawing
0 commit comments