mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-30 17:44:30 +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",
|
||||||
);
|
);
|
||||||
clipPath.id = `image-clipPath-${element.id}`;
|
clipPath.id = `image-clipPath-${element.id}`;
|
||||||
|
clipPath.setAttribute("clipPathUnits", "userSpaceOnUse");
|
||||||
const clipRect = svgRoot.ownerDocument!.createElementNS(
|
const clipRect = svgRoot.ownerDocument!.createElementNS(
|
||||||
SVG_NS,
|
SVG_NS,
|
||||||
"rect",
|
"rect",
|
||||||
@@ -550,6 +550,10 @@ const renderElementToSvg = (
|
|||||||
Math.min(element.width, element.height),
|
Math.min(element.width, element.height),
|
||||||
element,
|
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("width", `${element.width}`);
|
||||||
clipRect.setAttribute("height", `${element.height}`);
|
clipRect.setAttribute("height", `${element.height}`);
|
||||||
clipRect.setAttribute("rx", `${radius}`);
|
clipRect.setAttribute("rx", `${radius}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user