@oliasoft-open-source/charts-library 4.3.3-beta-3 → 4.3.3-beta-4

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
@@ -26170,7 +26170,7 @@ const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAn
26170
26170
  activeAnnotation.yMax = newCenterY + metrics.height / 2;
26171
26171
  }
26172
26172
  }
26173
- chart2.update();
26173
+ chart2 == null ? void 0 : chart2.update();
26174
26174
  if (activeAnnotation == null ? void 0 : activeAnnotation.onDrag) {
26175
26175
  activeAnnotation.onDrag({ x: x2, y: y2 }, cloneDeep(activeAnnotation));
26176
26176
  }
@@ -26178,9 +26178,9 @@ const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAn
26178
26178
  const { centerX, centerY } = calculateAnnotationMetricsInValues(activeAnnotation) ?? {};
26179
26179
  const { centerX: xValue, centerY: yValue } = calculateAnnotationMetricsInValuesInPixels(activeAnnotation, scales);
26180
26180
  if (!isNil(centerX) && !isNil(centerY) && !isNil(xValue) && !isNil(yValue)) {
26181
- ctx.save();
26182
- ctx.clearRect(0, 0, width, height);
26183
- chart2.draw();
26181
+ ctx == null ? void 0 : ctx.save();
26182
+ ctx == null ? void 0 : ctx.clearRect(0, 0, width, height);
26183
+ chart2 == null ? void 0 : chart2.draw();
26184
26184
  ctx.font = DEFAULT_FONT_FAMILY;
26185
26185
  ctx.fillStyle = "black";
26186
26186
  let labelX = xValue - 45;
@@ -26193,8 +26193,8 @@ const handleAnnotationMouseMove = (event, canvas2, scales, isDragging2, activeAn
26193
26193
  if (labelY > height) {
26194
26194
  labelY = height - 7;
26195
26195
  }
26196
- ctx.fillText(labelText, labelX, labelY);
26197
- ctx.restore();
26196
+ ctx == null ? void 0 : ctx.fillText(labelText, labelX, labelY);
26197
+ ctx == null ? void 0 : ctx.restore();
26198
26198
  }
26199
26199
  }
26200
26200
  };
@@ -26214,7 +26214,7 @@ const handleAnnotationMouseUp = (isDragging2, activeAnnotation, chart2, setDragg
26214
26214
  }
26215
26215
  setDraggingState(false, null);
26216
26216
  }
26217
- chart2.update();
26217
+ chart2 == null ? void 0 : chart2.update();
26218
26218
  }
26219
26219
  };
26220
26220
  const annotationLabel = (ctx, annotations, scales) => {
@@ -26303,6 +26303,7 @@ const annotationDraggerPlugin = {
26303
26303
  };
26304
26304
  if (!((_f2 = canvas2 == null ? void 0 : canvas2.dataset) == null ? void 0 : _f2.annotationDraggerInitialized) && (pluginOptions == null ? void 0 : pluginOptions.enabled) && hoveredAnnotationId) {
26305
26305
  if (!isNil(canvas2)) {
26306
+ console.log(cloneDeep(canvas2));
26306
26307
  canvas2 == null ? void 0 : canvas2.addEventListener(MouseEvents.MOUSEDOWN, (event) => {
26307
26308
  var _a3, _b3, _c3;
26308
26309
  handleAnnotationMouseDown(