|
@@ -1,20 +0,0 @@
|
|
|
-import { polygonCounterclockwise } from "../../../shared/math";
|
|
|
-import { WholeLineAttrib } from "../view/whole-line";
|
|
|
-
|
|
|
-export const normalWholeLinePolygon = (
|
|
|
- config: WholeLineAttrib,
|
|
|
- polygonId: string
|
|
|
-) => {
|
|
|
- // const polygon = config.polygons.find(({ id }) => id === polygonId);
|
|
|
- // if (!polygon) return null;
|
|
|
- // const points = polygon.points
|
|
|
- // .map((id) => config.points.find((point) => point.id === id))
|
|
|
- // .filter((point) => !!point);
|
|
|
- // const flatPoints = points.map(({ x, y }) => [x, y]);
|
|
|
- // if (!polygonCounterclockwise(flatPoints)) {
|
|
|
- // polygon.points.reverse();
|
|
|
- // }
|
|
|
- // // 形成闭合,需要确保整体逆时针方向,如果不是则修正
|
|
|
- // if (points[0] === points[points.length - 1]) {
|
|
|
- // }
|
|
|
-};
|