1 line
669 B
JavaScript
1 line
669 B
JavaScript
import MxDbAnyLine from".";import McEdGetPointWorldDrawObject from"../McEdGetPointWorldDrawObject";import MrxDbgUiPrBaseReturn from"../MrxDbgUiPrBaseReturn";import MrxDbgUiPrPoint from"../MrxDbgUiPrPoint";import MxFun from"../MxFun";export default function drawMxDbAnyLine(){const r=new MrxDbgUiPrPoint,t=MxFun.getCurrentDraw(),e=new McEdGetPointWorldDrawObject,n=new MxDbAnyLine;r.setUserDraw(e),r.setMessage("\n点击开始画线:"),r.go(o=>{o===MrxDbgUiPrBaseReturn.kOk&&(n.points.push(r.value()),e.setDraw(r=>{n.points.push(r.clone()),e.drawCustomEntity(n)})),r.setMessage("\n再次点击结束画线:"),r.go(r=>{r===MrxDbgUiPrBaseReturn.kOk&&t.addMxEntity(n)})})}; |