diff --git a/shepherd.js/src/utils/overlay-path.ts b/shepherd.js/src/utils/overlay-path.ts index 9fd1ce2a0..cf3cb43f1 100644 --- a/shepherd.js/src/utils/overlay-path.ts +++ b/shepherd.js/src/utils/overlay-path.ts @@ -38,22 +38,25 @@ export function makeOverlayPath(overlayPaths: OverlayPathParams[]) { ? { topLeft: r, topRight: r, bottomRight: r, bottomLeft: r } : r; - openings += `M${x + topLeft},${y}\ - a${topLeft},${topLeft},0,0,0-${topLeft},${topLeft}\ - V${height + y - bottomLeft}\ - a${bottomLeft},${bottomLeft},0,0,0,${bottomLeft},${bottomLeft}\ - H${width + x - bottomRight}\ - a${bottomRight},${bottomRight},0,0,0,${bottomRight}-${bottomRight}\ - V${y + topRight}\ - a${topRight},${topRight},0,0,0-${topRight}-${topRight}\ - Z`; + openings += + `M${x + topLeft},${y}` + + `a${topLeft},${topLeft},0,0,0-${topLeft},${topLeft}` + + `V${height + y - bottomLeft}` + + `a${bottomLeft},${bottomLeft},0,0,0,${bottomLeft},${bottomLeft}` + + `H${width + x - bottomRight}` + + `a${bottomRight},${bottomRight},0,0,0,${bottomRight}-${bottomRight}` + + `V${y + topRight}` + + `a${topRight},${topRight},0,0,0-${topRight}-${topRight}` + + `Z`; }); - return `M${w},${h}\ - H0\ - V0\ - H${w}\ - V${h}\ - Z\ - ${openings}`.replace(/\s/g, ''); + return ( + `M${w},${h}` + + `H0` + + `V0` + + `H${w}` + + `V${h}` + + `Z` + + `${openings}` + ).replace(/\s/g, ''); }