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