This commit is contained in:
ct
2025-07-08 04:32:04 +08:00
parent 6bf69ef366
commit a0cbe192e7
5 changed files with 159 additions and 19 deletions

View File

@@ -225,12 +225,12 @@ export default function TextSidebar({ isOpen, onClose }) {
color: fillColor,
textShadow:
strokeWidth > 0
? `
-${strokeWidth * 0.6}px -${strokeWidth * 0.6}px 0 ${strokeColor},
${strokeWidth * 0.6}px -${strokeWidth * 0.6}px 0 ${strokeColor},
-${strokeWidth * 0.6}px ${strokeWidth * 0.6}px 0 ${strokeColor},
${strokeWidth * 0.6}px ${strokeWidth * 0.6}px 0 ${strokeColor}
`
? Array.from({ length: 10 }, (_, i) => {
const angle = (i * Math.PI * 2) / 8;
const x = Math.cos(angle) * strokeWidth * 0.6;
const y = Math.sin(angle) * strokeWidth * 0.6;
return `${x.toFixed(1)}px ${y.toFixed(1)}px 0 ${strokeColor}`;
}).join(', ')
: 'none',
}}
/>