Skip to content

🎥 Make videos programmatically with React

fix

Jonny Burger333b7653bce6
diff --git a/packages/web-renderer/src/drawing/draw-outline.ts b/packages/web-renderer/src/drawing/draw-outline.ts
index 769ef4de32..33f1c68617 100644
--- a/packages/web-renderer/src/drawing/draw-outline.ts
+++ b/packages/web-renderer/src/drawing/draw-outline.ts
@@ -76,20 +76,44 @@ export const drawOutline = ({
// When outline-offset is negative, we need to shrink the radius
const adjustedBorderRadius = {
topLeft: {
- horizontal: Math.max(0, borderRadius.topLeft.horizontal + offset),
- vertical: Math.max(0, borderRadius.topLeft.vertical + offset),
+ horizontal:
+ borderRadius.topLeft.horizontal === 0
+ ? 0
+ : Math.max(0, borderRadius.topLeft.horizontal + offset),
+ vertical:
+ borderRadius.topLeft.vertical === 0
+ ? 0
+ : Math.max(0, borderRadius.topLeft.vertical + offset),
},
topRight: {
- horizontal: Math.max(0, borderRadius.topRight.horizontal + offset),
- vertical: Math.max(0, borderRadius.topRight.vertical + offset),
+ horizontal:
+ borderRadius.topRight.horizontal === 0
+ ? 0
+ : Math.max(0, borderRadius.topRight.horizontal + offset),
+ vertical:
+ borderRadius.topRight.vertical === 0
+ ? 0
+ : Math.max(0, borderRadius.topRight.vertical + offset),
},
bottomRight: {
- horizontal: Math.max(0, borderRadius.bottomRight.horizontal + offset),
- vertical: Math.max(0, borderRadius.bottomRight.vertical + offset),
+ horizontal:
+ borderRadius.bottomRight.horizontal === 0
+ ? 0
+ : Math.max(0, borderRadius.bottomRight.horizontal + offset),
+ vertical:
+ borderRadius.bottomRight.vertical === 0
+ ? 0
+ : Math.max(0, borderRadius.bottomRight.vertical + offset),
},
bottomLeft: {
- horizontal: Math.max(0, borderRadius.bottomLeft.horizontal + offset),
- vertical: Math.max(0, borderRadius.bottomLeft.vertical + offset),
+ horizontal:
+ borderRadius.bottomLeft.horizontal === 0
+ ? 0
+ : Math.max(0, borderRadius.bottomLeft.horizontal + offset),
+ vertical:
+ borderRadius.bottomLeft.vertical === 0
+ ? 0
+ : Math.max(0, borderRadius.bottomLeft.vertical + offset),
},
};
diff --git a/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-chromium-darwin.png b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-chromium-darwin.png
new file mode 100644
index 0000000000..07bb8ace58
Binary files /dev/null and b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-chromium-darwin.png differ
diff --git a/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-firefox-darwin.png b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-firefox-darwin.png
new file mode 100644
index 0000000000..f58c27f123
Binary files /dev/null and b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-firefox-darwin.png differ
diff --git a/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-webkit-darwin.png b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-webkit-darwin.png
new file mode 100644
index 0000000000..29873ed8e7
Binary files /dev/null and b/packages/web-renderer/src/test/__screenshots__/outline.test.tsx/outline-webkit-darwin.png differ