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