@oliasoft-open-source/charts-library 4.7.7-beta-8 → 4.7.7-beta-9

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
@@ -26615,6 +26615,15 @@ const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAn
26615
26615
  }
26616
26616
  }
26617
26617
  };
26618
+ const handleAnnotationMouseUp = (isDragging2, activeAnnotation, chart2, canvas2, setDraggingState) => {
26619
+ if (isDragging2) {
26620
+ if (activeAnnotation) {
26621
+ const annotationId = activeAnnotation == null ? void 0 : activeAnnotation.id;
26622
+ setAnnotationBorderWidth(chart2, annotationId, BORDER_WIDTH.ZERO);
26623
+ calculateAnnotationMetricsInValues(activeAnnotation) ?? {};
26624
+ }
26625
+ }
26626
+ };
26618
26627
  const annotationLabel = (ctx, annotations, scales) => {
26619
26628
  Object.values(annotations).forEach((annotation2) => {
26620
26629
  var _a2;
@@ -26750,6 +26759,11 @@ const annotationDraggerPlugin = {
26750
26759
  });
26751
26760
  canvas2.addEventListener(MouseEvents.MOUSEUP, (event) => {
26752
26761
  event.currentTarget;
26762
+ handleAnnotationMouseUp(
26763
+ isDragging2,
26764
+ activeAnnotation,
26765
+ chart2
26766
+ );
26753
26767
  });
26754
26768
  canvas2.dataset.annotationDraggerInitialized = "true";
26755
26769
  }