修复标注实体的脚线被错误的修改的问题

pull/556/MERGE
ChenX 5 years ago
parent 5dec243f9f
commit 974136b833

@ -109,9 +109,9 @@ export class AlignedDimension extends Entity
{ {
this.UpdateText(); this.UpdateText();
return [ return [
new Line(this.m_FootP1, this.m_ArmP1), new Line(this.m_FootP1.clone(), this.m_ArmP1.clone()),
new Line(this.m_ArmP2, this.m_ArmP1), new Line(this.m_ArmP2.clone(), this.m_ArmP1.clone()),
new Line(this.m_ArmP2, this.m_FootP2), new Line(this.m_ArmP2.clone(), this.m_FootP2.clone()),
this._Text.Clone() this._Text.Clone()
].map(en => en.ApplyMatrix(this.OCS)); ].map(en => en.ApplyMatrix(this.OCS));
} }
@ -238,7 +238,6 @@ export class AlignedDimension extends Entity
{ {
if (i >= 2) if (i >= 2)
{ {
this.WriteAllObjectRecord();
let p = this.TextPosition.add(vec).applyMatrix4(this.OCSInv); let p = this.TextPosition.add(vec).applyMatrix4(this.OCSInv);
let l = new Line(this.m_ArmP1, this.m_ArmP2); let l = new Line(this.m_ArmP1, this.m_ArmP2);
let cp = l.GetClosestPointTo(p, true); let cp = l.GetClosestPointTo(p, true);

@ -0,0 +1,17 @@
export function DebugObject<T extends object>(object: T, listenKey: string): T
{
return new Proxy(object, {
set: (target, key, value, receiver) =>
{
if (Reflect.get(target, key, receiver) !== value)
{
if (key === listenKey)
{
}
}
return Reflect.set(target, key, value, receiver);
}
});
}

@ -33,6 +33,9 @@ export class ContentComponent extends React.Component<{ store?: TopPanelStore; }
{ {
this.props.store.openMain = false; this.props.store.openMain = false;
this.props.store.editoring = true; this.props.store.editoring = true;
let fid = localStorage.getItem('lastfid');
if (fid)
(FileServer.GetInstance() as FileServer).OpenFile(fid);
return; return;
} }
await this.props.store.UpdateFileList(); await this.props.store.UpdateFileList();

Loading…
Cancel
Save