@sentry/feedback 10.75.3 → 10.76.1

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.
@@ -1555,11 +1555,13 @@ function useTakeScreenshotFactory({ hooks }) {
1555
1555
  function drawRect(command, ctx, color) {
1556
1556
  switch (command.type) {
1557
1557
  case "highlight": {
1558
+ ctx.save();
1558
1559
  ctx.shadowColor = "rgba(0, 0, 0, 0.7)";
1559
1560
  ctx.shadowBlur = 50;
1560
1561
  ctx.fillStyle = color;
1561
1562
  ctx.fillRect(command.x - 1, command.y - 1, command.w + 2, command.h + 2);
1562
1563
  ctx.clearRect(command.x, command.y, command.w, command.h);
1564
+ ctx.restore();
1563
1565
  break;
1564
1566
  }
1565
1567
  case "hide":
@@ -1684,8 +1686,8 @@ function ScreenshotEditorFactory({
1684
1686
  const boundingRect = mouseRef.current.getBoundingClientRect();
1685
1687
  const startingPoint = {
1686
1688
  type: action,
1687
- x: e.offsetX / scaleFactor,
1688
- y: e.offsetY / scaleFactor};
1689
+ x: (e.clientX - boundingRect.x) / scaleFactor,
1690
+ y: (e.clientY - boundingRect.y) / scaleFactor};
1689
1691
  const getDrawCommand = (startingPoint2, e2) => {
1690
1692
  const x = (e2.clientX - boundingRect.x) / scaleFactor;
1691
1693
  const y = (e2.clientY - boundingRect.y) / scaleFactor;