|
@@ -148,6 +148,7 @@ export const penWholeLinePoygonsEdit = <
|
|
|
let child = target && tree.find(target.id());
|
|
|
const pixel = [evt.evt.offsetX, evt.evt.offsetY];
|
|
|
|
|
|
+ console.log(child);
|
|
|
if (child instanceof WholeLineLine) {
|
|
|
if (!canOper || canOper(child, evt.target)) {
|
|
|
if (polyginAttrib.lineIds.includes(child.attrib.id)) {
|
|
@@ -193,6 +194,7 @@ export const penWholeLinePoygonsEdit = <
|
|
|
radius: adsorbRadius,
|
|
|
points: [...points].reverse(),
|
|
|
});
|
|
|
+ console.log(position);
|
|
|
} else {
|
|
|
position = tree.getRealFromStage(pixel);
|
|
|
}
|
|
@@ -203,8 +205,8 @@ export const penWholeLinePoygonsEdit = <
|
|
|
if (flatChildren[i] instanceof WholeLinePoint) {
|
|
|
const point = flatChildren[i] as WholeLinePoint;
|
|
|
if (
|
|
|
- round(point.attrib.x - position[0], 4) === 0 &&
|
|
|
- round(point.attrib.y - position[1], 4) === 0
|
|
|
+ round(point.attrib.x - position[0], 8) === 0 &&
|
|
|
+ round(point.attrib.y - position[1], 8) === 0
|
|
|
) {
|
|
|
child = tree.children[i];
|
|
|
break;
|