From 2c2739105809ece7c40e79201cfb2f77670b4a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Fri, 22 Aug 2025 15:44:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=B9=E9=87=8F=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/BatchModel/index.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/Obj/Base/BatchModel/index.js b/src/Obj/Base/BatchModel/index.js index af82c3a..d61e6cd 100644 --- a/src/Obj/Base/BatchModel/index.js +++ b/src/Obj/Base/BatchModel/index.js @@ -47,8 +47,30 @@ class BatchModel extends Base { this.pointArr = [] this.sdk.addIncetance(this.options.id, this) // BatchModel.computeDis(this) - if (this.options.positions.length > 0 || this.options.positions.lng) { - BatchModel.computeDis(this) + // if (this.options.positions.length > 0 || this.options.positions.lng) { + if (options.type && options.spacing != undefined) { + // BatchModel.computeDis(this) + + let Draw + switch (options.type) { + case '点': + Draw = new DrawPoint(this.sdk) + break; + case '线': + Draw = new DrawPolyline(this.sdk) + break; + case '面': + Draw = new DrawThreeRect(this.sdk) + break; + default: + break; + } + Draw && Draw.start((a, positions) => { + this.options.positions = positions; + // this.callback(this.options); + (this.options.positions.length || this.options.positions.lng) && BatchModel.computeDis(this) + }) + } else { this.edit(true) }