mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-29 09:04:31 +01:00
Remove clipPathUnits attribute from clipPath
Removed setting of clipPathUnits attribute for clipPath element.
This commit is contained in:
@@ -541,7 +541,7 @@ const renderElementToSvg = (
|
||||
"clipPath",
|
||||
);
|
||||
clipPath.id = `image-clipPath-${element.id}`;
|
||||
|
||||
clipPath.setAttribute("clipPathUnits", "userSpaceOnUse");
|
||||
const clipRect = svgRoot.ownerDocument!.createElementNS(
|
||||
SVG_NS,
|
||||
"rect",
|
||||
@@ -550,6 +550,10 @@ const renderElementToSvg = (
|
||||
Math.min(element.width, element.height),
|
||||
element,
|
||||
);
|
||||
const clipOffsetX = element.crop ? normalizedCropX : 0;
|
||||
const clipOffsetY = element.crop ? normalizedCropY : 0;
|
||||
clipRect.setAttribute("x", `${clipOffsetX}`);
|
||||
clipRect.setAttribute("y", `${clipOffsetY}`);
|
||||
clipRect.setAttribute("width", `${element.width}`);
|
||||
clipRect.setAttribute("height", `${element.height}`);
|
||||
clipRect.setAttribute("rx", `${radius}`);
|
||||
|
||||
Reference in New Issue
Block a user