@rm-graph/core 0.1.4 → 0.1.5

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.mjs CHANGED
@@ -1381,30 +1381,49 @@ var PRPDChart = class {
1381
1381
  */
1382
1382
  destroy() {
1383
1383
  if (this.isDestroyed) return;
1384
- this.clearHeatmapLegend();
1385
- if (this.sineLineSeries && this.surface) {
1386
- this.surface.renderableSeries.remove(this.sineLineSeries);
1387
- this.sineLineSeries.delete();
1388
- this.sineLineSeries = null;
1384
+ this.isDestroyed = true;
1385
+ try {
1386
+ this.clearHeatmapLegend();
1387
+ } catch (e) {
1389
1388
  }
1390
- if (this.sineDataSeries) {
1391
- this.sineDataSeries.delete();
1392
- this.sineDataSeries = null;
1389
+ try {
1390
+ if (this.sineLineSeries && this.surface) {
1391
+ this.surface.renderableSeries.remove(this.sineLineSeries);
1392
+ this.sineLineSeries.delete();
1393
+ }
1394
+ } catch (e) {
1393
1395
  }
1394
- if (this.heatmapSeries && this.surface) {
1395
- this.surface.renderableSeries.remove(this.heatmapSeries);
1396
- this.heatmapSeries.delete();
1397
- this.heatmapSeries = null;
1396
+ this.sineLineSeries = null;
1397
+ try {
1398
+ if (this.sineDataSeries) {
1399
+ this.sineDataSeries.delete();
1400
+ }
1401
+ } catch (e) {
1398
1402
  }
1399
- if (this.heatmapDataSeries) {
1400
- this.heatmapDataSeries.delete();
1401
- this.heatmapDataSeries = null;
1403
+ this.sineDataSeries = null;
1404
+ try {
1405
+ if (this.heatmapSeries && this.surface) {
1406
+ this.surface.renderableSeries.remove(this.heatmapSeries);
1407
+ this.heatmapSeries.delete();
1408
+ }
1409
+ } catch (e) {
1402
1410
  }
1403
- if (this.surface) {
1404
- this.surface.delete();
1405
- this.surface = null;
1411
+ this.heatmapSeries = null;
1412
+ try {
1413
+ if (this.heatmapDataSeries) {
1414
+ this.heatmapDataSeries.delete();
1415
+ }
1416
+ } catch (e) {
1406
1417
  }
1407
- this.isDestroyed = true;
1418
+ this.heatmapDataSeries = null;
1419
+ try {
1420
+ if (this.surface) {
1421
+ this.surface.chartModifiers.clear();
1422
+ this.surface.delete();
1423
+ }
1424
+ } catch (e) {
1425
+ }
1426
+ this.surface = null;
1408
1427
  }
1409
1428
  };
1410
1429
  async function createPRPDChart(container, config) {