@rm-graph/core 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +32 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -451,9 +451,16 @@ var Surface3DChart = class {
|
|
|
451
451
|
if (!this.container) {
|
|
452
452
|
throw new Error("Container not set");
|
|
453
453
|
}
|
|
454
|
+
if (!this.container.id) {
|
|
455
|
+
this.container.id = this.id;
|
|
456
|
+
}
|
|
454
457
|
const { sciChart3DSurface, wasmContext } = await SciChart3DSurface.create(
|
|
455
458
|
this.container.id
|
|
456
459
|
);
|
|
460
|
+
if (this.isDestroyed) {
|
|
461
|
+
sciChart3DSurface.delete();
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
457
464
|
this.surface = sciChart3DSurface;
|
|
458
465
|
this.wasmContext = wasmContext;
|
|
459
466
|
sciChart3DSurface.xAxis = new NumericAxis3D(wasmContext, {
|
|
@@ -574,12 +581,20 @@ var Surface3DChart = class {
|
|
|
574
581
|
*/
|
|
575
582
|
destroy() {
|
|
576
583
|
if (this.isDestroyed) return;
|
|
577
|
-
this.
|
|
584
|
+
this.isDestroyed = true;
|
|
585
|
+
try {
|
|
586
|
+
this.clearSurface();
|
|
587
|
+
} catch (e) {
|
|
588
|
+
}
|
|
578
589
|
if (this.surface) {
|
|
579
|
-
|
|
590
|
+
try {
|
|
591
|
+
this.surface.delete();
|
|
592
|
+
} catch (e) {
|
|
593
|
+
}
|
|
580
594
|
this.surface = null;
|
|
581
595
|
}
|
|
582
|
-
this.
|
|
596
|
+
this.container = null;
|
|
597
|
+
this.wasmContext = null;
|
|
583
598
|
}
|
|
584
599
|
/**
|
|
585
600
|
* Get current configuration
|
|
@@ -656,12 +671,19 @@ var Column3DChart = class {
|
|
|
656
671
|
if (!this.container) {
|
|
657
672
|
throw new Error("Container not set");
|
|
658
673
|
}
|
|
674
|
+
if (!this.container.id) {
|
|
675
|
+
this.container.id = this.id;
|
|
676
|
+
}
|
|
659
677
|
const { sciChart3DSurface, wasmContext } = await SciChart3DSurface.create(
|
|
660
678
|
this.container.id,
|
|
661
679
|
{
|
|
662
680
|
isZYPlaneVisible: false
|
|
663
681
|
}
|
|
664
682
|
);
|
|
683
|
+
if (this.isDestroyed) {
|
|
684
|
+
sciChart3DSurface.delete();
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
665
687
|
this.surface = sciChart3DSurface;
|
|
666
688
|
this.wasmContext = wasmContext;
|
|
667
689
|
const cameraPos = this.config.cameraPosition ?? { x: -250, y: 450, z: 280 };
|
|
@@ -833,11 +855,16 @@ var Column3DChart = class {
|
|
|
833
855
|
*/
|
|
834
856
|
destroy() {
|
|
835
857
|
if (this.isDestroyed) return;
|
|
858
|
+
this.isDestroyed = true;
|
|
836
859
|
if (this.surface) {
|
|
837
|
-
|
|
860
|
+
try {
|
|
861
|
+
this.surface.delete();
|
|
862
|
+
} catch (e) {
|
|
863
|
+
}
|
|
838
864
|
this.surface = null;
|
|
839
865
|
}
|
|
840
|
-
this.
|
|
866
|
+
this.container = null;
|
|
867
|
+
this.wasmContext = null;
|
|
841
868
|
}
|
|
842
869
|
/**
|
|
843
870
|
* Get current configuration
|