@oliasoft-open-source/charts-library 4.7.7-beta-12 → 4.7.7-beta-14

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
@@ -26621,7 +26621,15 @@ const handleAnnotationMouseUp = (isDragging2, activeAnnotation, chart2, canvas2,
26621
26621
  const annotationId = activeAnnotation == null ? void 0 : activeAnnotation.id;
26622
26622
  setAnnotationBorderWidth(chart2, annotationId, BORDER_WIDTH.ZERO);
26623
26623
  const { centerX = -1, centerY = -1 } = calculateAnnotationMetricsInValues(activeAnnotation) ?? {};
26624
- console.log(centerX, centerY);
26624
+ if (!isNil(activeAnnotation == null ? void 0 : activeAnnotation.onDragEnd)) {
26625
+ activeAnnotation == null ? void 0 : activeAnnotation.onDragEnd(
26626
+ { x: centerX, y: centerY },
26627
+ activeAnnotation
26628
+ );
26629
+ }
26630
+ if (!isNil(canvas2) && !isNil(canvas2.style)) {
26631
+ canvas2.style.cursor = CursorStyle.Pointer;
26632
+ }
26625
26633
  setDraggingState(false, null);
26626
26634
  chart2 == null ? void 0 : chart2.update();
26627
26635
  }
@@ -26697,7 +26705,7 @@ const annotationDraggerPlugin = {
26697
26705
  },
26698
26706
  afterUpdate(chart2) {
26699
26707
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
26700
- const { canvas: canvas2, scales, hoveredAnnotationId } = chart2;
26708
+ const { canvas: canvas2, scales, hoveredAnnotationId } = chart2 ?? {};
26701
26709
  const pluginOptions = ((_b2 = (_a2 = chart2 == null ? void 0 : chart2.options) == null ? void 0 : _a2.plugins) == null ? void 0 : _b2.annotationDraggerPlugin) || {
26702
26710
  enabled: false
26703
26711
  };