@oliasoft-open-source/charts-library 4.3.3-beta-1 → 4.3.3-beta-2

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 CHANGED
@@ -26301,8 +26301,8 @@ const annotationDraggerPlugin = {
26301
26301
  dragStartY = startY;
26302
26302
  }
26303
26303
  };
26304
- if (!canvas2.dataset.annotationDraggerInitialized && pluginOptions.enabled && hoveredAnnotationId) {
26305
- canvas2.addEventListener(MouseEvents.MOUSEDOWN, (event) => {
26304
+ if (canvas2 && !canvas2.dataset.annotationDraggerInitialized && pluginOptions.enabled && hoveredAnnotationId) {
26305
+ canvas2 == null ? void 0 : canvas2.addEventListener(MouseEvents.MOUSEDOWN, (event) => {
26306
26306
  var _a3, _b3, _c3;
26307
26307
  handleAnnotationMouseDown(
26308
26308
  event,
@@ -26313,7 +26313,7 @@ const annotationDraggerPlugin = {
26313
26313
  chart2.hoveredAnnotationId
26314
26314
  );
26315
26315
  });
26316
- canvas2.addEventListener(MouseEvents.MOUSEMOVE, (event) => {
26316
+ canvas2 == null ? void 0 : canvas2.addEventListener(MouseEvents.MOUSEMOVE, (event) => {
26317
26317
  handleAnnotationMouseMove(
26318
26318
  event,
26319
26319
  canvas2,
@@ -26325,7 +26325,7 @@ const annotationDraggerPlugin = {
26325
26325
  chart2
26326
26326
  );
26327
26327
  });
26328
- canvas2.addEventListener(MouseEvents.MOUSEUP, () => {
26328
+ canvas2 == null ? void 0 : canvas2.addEventListener(MouseEvents.MOUSEUP, () => {
26329
26329
  handleAnnotationMouseUp(
26330
26330
  isDragging2,
26331
26331
  activeAnnotation,
@@ -26336,11 +26336,11 @@ const annotationDraggerPlugin = {
26336
26336
  canvas2.dataset.annotationDraggerInitialized = "true";
26337
26337
  }
26338
26338
  if (!pluginOptions.enabled) {
26339
- canvas2.removeEventListener(MouseEvents.MOUSEDOWN, () => {
26339
+ canvas2 == null ? void 0 : canvas2.removeEventListener(MouseEvents.MOUSEDOWN, () => {
26340
26340
  });
26341
- canvas2.removeEventListener(MouseEvents.MOUSEMOVE, () => {
26341
+ canvas2 == null ? void 0 : canvas2.removeEventListener(MouseEvents.MOUSEMOVE, () => {
26342
26342
  });
26343
- canvas2.removeEventListener(MouseEvents.MOUSEUP, () => {
26343
+ canvas2 == null ? void 0 : canvas2.removeEventListener(MouseEvents.MOUSEUP, () => {
26344
26344
  });
26345
26345
  canvas2.dataset.annotationDraggerInitialized = "";
26346
26346
  }