diff --git a/src/Editor/SnapServices.ts b/src/Editor/SnapServices.ts index d53ca32e9..a8c54b717 100644 --- a/src/Editor/SnapServices.ts +++ b/src/Editor/SnapServices.ts @@ -274,15 +274,21 @@ export class SnapServices () => { let fIndex = this.m_SupportSnapPoints.findIndex(p => equalv3(p.Point, snapData.Point)); - if (fIndex > 0)//基点不移除 + if (fIndex !== -1) { - this.m_SupportSnapPoints.splice(fIndex, 1); + if (!(fIndex === 0 && this.m_HasBasePoint))//基点不移除 + this.m_SupportSnapPoints.splice(fIndex, 1); } else { this.m_SupportSnapPoints.push(snapData); if (this.m_SupportSnapPoints.length > 7) - this.m_SupportSnapPoints.shift(); + { + if (this.m_HasBasePoint) + this.m_SupportSnapPoints.splice(1, 1); + else + this.m_SupportSnapPoints.shift(); + } } this.UpdateCrossCursor(); },