1 |
- import{af as u,e as g,k as M,d as r,$ as d,E as D,bS as x,n as w,b as l,q as T,h as C,a5 as c}from"./index-D68iA7pN.js";const{isShow:E,showDialog:f,confirm:m,onReveal:A}=u(),p=async()=>{const a=new M;a.setMessage(r("518")+":"),a.setCursorType(d.kCross);const i=await a.go();if(!i)return;let o=new D;o.setMessage(r("519")+":");let t=await o.go();if(t===null)return;const n=await f(!0,{text:"测试"});if(!n||!n.data)return;const{data:s}=n;let e=new x;e.textString=s.text,e.position=new w(i),e.alignmentPoint=e.position,e.height=t,e.rotation=Number(s.angle)*3.14159265/180,l.getCurrentMxCAD().drawEntity(e),l.getCurrentMxCAD().updateDisplay()},y=async()=>{let a=new T;a.AddMcDbEntityTypes("TEXT,MTEXT");let i=new C;i.setFilter(a),i.setMessage(r("520"));let o=await i.go();if(!o.isValid())return;let t=o.getMcDbEntity();if(!t)return;let n;if(t instanceof x?n=t.textString:t instanceof c&&(n=t.contents),!n)return;const s=await f(!0,{text:n});if(!s||!s.data)return;const{data:e}=s;t instanceof x?(t.textString=e.text,t.rotation=Number(e.angle)*3.14159265/180):t instanceof c&&(t.contents=e.text,t.rotation=Number(e.angle)*3.14159265/180),l.getCurrentMxCAD().updateDisplay()};g("Mx_EditText",y);g("_DrawText",()=>{p()});export{m as c,E as i,A as o,f as s};
|