@sentry/feedback 11.3.0 → 11.5.0
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/build/npm/cjs/index.js +4 -2
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +4 -2
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/screenshot/components/ScreenshotEditor.d.ts.map +1 -1
- package/package.json +2 -2
package/build/npm/cjs/index.js
CHANGED
|
@@ -1567,11 +1567,13 @@ function useTakeScreenshotFactory({ hooks }) {
|
|
|
1567
1567
|
function drawRect(command, ctx, color) {
|
|
1568
1568
|
switch (command.type) {
|
|
1569
1569
|
case "highlight": {
|
|
1570
|
+
ctx.save();
|
|
1570
1571
|
ctx.shadowColor = "rgba(0, 0, 0, 0.7)";
|
|
1571
1572
|
ctx.shadowBlur = 50;
|
|
1572
1573
|
ctx.fillStyle = color;
|
|
1573
1574
|
ctx.fillRect(command.x - 1, command.y - 1, command.w + 2, command.h + 2);
|
|
1574
1575
|
ctx.clearRect(command.x, command.y, command.w, command.h);
|
|
1576
|
+
ctx.restore();
|
|
1575
1577
|
break;
|
|
1576
1578
|
}
|
|
1577
1579
|
case "hide":
|
|
@@ -1696,8 +1698,8 @@ function ScreenshotEditorFactory({
|
|
|
1696
1698
|
const boundingRect = mouseRef.current.getBoundingClientRect();
|
|
1697
1699
|
const startingPoint = {
|
|
1698
1700
|
type: action,
|
|
1699
|
-
x: e.
|
|
1700
|
-
y: e.
|
|
1701
|
+
x: (e.clientX - boundingRect.x) / scaleFactor,
|
|
1702
|
+
y: (e.clientY - boundingRect.y) / scaleFactor};
|
|
1701
1703
|
const getDrawCommand = (startingPoint2, e2) => {
|
|
1702
1704
|
const x = (e2.clientX - boundingRect.x) / scaleFactor;
|
|
1703
1705
|
const y = (e2.clientY - boundingRect.y) / scaleFactor;
|