修改批量模型操作
This commit is contained in:
@ -47,8 +47,30 @@ class BatchModel extends Base {
|
|||||||
this.pointArr = []
|
this.pointArr = []
|
||||||
this.sdk.addIncetance(this.options.id, this)
|
this.sdk.addIncetance(this.options.id, this)
|
||||||
// BatchModel.computeDis(this)
|
// BatchModel.computeDis(this)
|
||||||
if (this.options.positions.length > 0 || this.options.positions.lng) {
|
// if (this.options.positions.length > 0 || this.options.positions.lng) {
|
||||||
BatchModel.computeDis(this)
|
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 {
|
} else {
|
||||||
this.edit(true)
|
this.edit(true)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user