微调
This commit is contained in:
parent
fc23bb11d5
commit
81e5c23093
@ -339,14 +339,9 @@ export class SectionGraphicHitArea implements IHitArea {
|
||||
|
||||
function buildAbsorbablePositions(section: Section): AbsorbablePosition[] {
|
||||
const aps: AbsorbablePosition[] = [];
|
||||
|
||||
const sectionRef = section.relationManage
|
||||
.getRelationsOfGraphicAndOtherType(section, Section.Type)
|
||||
.map((r) => r.getOtherGraphic<Section>(section));
|
||||
sectionRef.forEach((other) => {
|
||||
const [ps, pe] = [
|
||||
other.localToCanvasPoint(other.getStartPoint()),
|
||||
other.localToCanvasPoint(other.getEndPoint()),
|
||||
section.localToCanvasPoint(section.getStartPoint()),
|
||||
section.localToCanvasPoint(section.getEndPoint()),
|
||||
];
|
||||
const { width, height } = section.getGraphicApp().canvas;
|
||||
const xs = new AbsorbableLine({ x: 0, y: ps.y }, { x: width, y: ps.y });
|
||||
@ -354,7 +349,6 @@ function buildAbsorbablePositions(section: Section): AbsorbablePosition[] {
|
||||
const xe = new AbsorbableLine({ x: 0, y: pe.y }, { x: width, y: pe.y });
|
||||
const ye = new AbsorbableLine({ x: pe.x, y: 0 }, { x: pe.x, y: height });
|
||||
aps.push(xs, ys, xe, ye);
|
||||
});
|
||||
const sections = section.queryStore
|
||||
.queryByType<Section>(Section.Type)
|
||||
.filter((g) => g.datas.sectionType == SectionType.Physical);
|
||||
|
Loading…
Reference in New Issue
Block a user