refactor: better preview
This commit is contained in:
parent
2e03ef3591
commit
2d4b719e10
|
|
@ -154,9 +154,8 @@ export function PltPreview(props: PltPreviewProps) {
|
|||
<path
|
||||
d={travelPathD()}
|
||||
fill="none"
|
||||
stroke="#999"
|
||||
stroke-width="0.2"
|
||||
stroke-dasharray="2 2"
|
||||
stroke="#f884"
|
||||
stroke-width="1"
|
||||
/>
|
||||
</Show>
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export function getPointOnPath(points: [number, number][], progress: number): [n
|
|||
* @param points 轮廓点数组
|
||||
* @param closed 是否闭合路径
|
||||
*/
|
||||
export function contourToSvgPath(points: [number, number][], closed = true): string {
|
||||
export function contourToSvgPath(points: [number, number][], closed = false): string {
|
||||
if (points.length === 0) return '';
|
||||
|
||||
const [startX, startY] = points[0];
|
||||
|
|
|
|||
Loading…
Reference in New Issue