mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: Upgrade Sentry to latest and update debug messages (#9134)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
parent
77dc055d81
commit
f12b92ce9d
7 changed files with 116 additions and 110 deletions
|
@ -219,9 +219,8 @@ const restoreElementWithProperties = <
|
|||
element.height > 1e6
|
||||
) {
|
||||
console.error(
|
||||
`Restore element with properties size or position is too large ${JSON.stringify(
|
||||
element,
|
||||
)}`,
|
||||
"Restore element with properties size or position is too large",
|
||||
{ element },
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -251,11 +250,7 @@ const restoreElement = (
|
|||
element.height < -1e6 ||
|
||||
element.height > 1e6
|
||||
) {
|
||||
console.error(
|
||||
`Restore element size or position is too large ${JSON.stringify(
|
||||
element,
|
||||
)}`,
|
||||
);
|
||||
console.error("Restore element size or position is too large", { element });
|
||||
}
|
||||
|
||||
switch (element.type) {
|
||||
|
|
|
@ -910,9 +910,11 @@ export const updateElbowArrowPoints = (
|
|||
arrow.y + (arrow?.points?.[arrow?.points?.length - 1]?.[1] ?? 0) > MAX_POS
|
||||
) {
|
||||
console.error(
|
||||
`Elbow arrow (or update) is outside reasonable bounds (> 1e6) arrow: ${JSON.stringify(
|
||||
"Elbow arrow (or update) is outside reasonable bounds (> 1e6)",
|
||||
{
|
||||
arrow,
|
||||
)} updates: ${JSON.stringify(updates)}`,
|
||||
updates,
|
||||
},
|
||||
);
|
||||
}
|
||||
// @ts-ignore See above note
|
||||
|
@ -2046,14 +2048,13 @@ const normalizeArrowElementUpdate = (
|
|||
offsetY + points[points.length - 1][1] > MAX_POS
|
||||
) {
|
||||
console.error(
|
||||
`Elbow arrow normalization is outside reasonable bounds (> 1e6) arrow: ${JSON.stringify(
|
||||
{
|
||||
x: offsetX,
|
||||
y: offsetY,
|
||||
points,
|
||||
...getSizeFromPoints(points),
|
||||
},
|
||||
)}`,
|
||||
"Elbow arrow normalization is outside reasonable bounds (> 1e6)",
|
||||
{
|
||||
x: offsetX,
|
||||
y: offsetY,
|
||||
points,
|
||||
...getSizeFromPoints(points),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -111,16 +111,14 @@ const _newElementBase = <T extends ExcalidrawElement>(
|
|||
height < -1e6 ||
|
||||
height > 1e6
|
||||
) {
|
||||
console.error(
|
||||
`New element size or position is too large ${JSON.stringify({
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
// @ts-ignore
|
||||
points: rest.points,
|
||||
})}`,
|
||||
);
|
||||
console.error("New element size or position is too large", {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
// @ts-ignore
|
||||
points: rest.points,
|
||||
});
|
||||
}
|
||||
|
||||
// assign type to guard against excess properties
|
||||
|
|
|
@ -779,11 +779,13 @@ const getResizedOrigin = (
|
|||
) > 1e6
|
||||
) {
|
||||
console.error(
|
||||
`getResizedOrigin() new calculation creates extremely large (> 1e6) y value where the old calculation resulted in ${
|
||||
y +
|
||||
(newHeight - prevHeight) / 2 +
|
||||
((prevWidth - newWidth) / 2) * Math.sin(angle)
|
||||
}`,
|
||||
"getResizedOrigin() new calculation creates extremely large (> 1e6) y value where the old calculation resulted in",
|
||||
{
|
||||
result:
|
||||
y +
|
||||
(newHeight - prevHeight) / 2 +
|
||||
((prevWidth - newWidth) / 2) * Math.sin(angle),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue