批量添加模型间距限制
This commit is contained in:
@ -38,7 +38,7 @@ class BatchModel extends Base {
|
|||||||
this.options.name = options.name || '批量模型'
|
this.options.name = options.name || '批量模型'
|
||||||
this.options.type = options.type || '面'
|
this.options.type = options.type || '面'
|
||||||
this.options.url = options.url || ''
|
this.options.url = options.url || ''
|
||||||
this.options.spacing = options.spacing || 50
|
this.options.spacing = options.spacing * 1 || 50
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.callback = callback
|
this.callback = callback
|
||||||
@ -50,6 +50,10 @@ class BatchModel extends Base {
|
|||||||
let tools = new Tools(sdk)
|
let tools = new Tools(sdk)
|
||||||
// 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) {
|
||||||
|
if (this.options.spacing < 0 || options.spacing * 1 === 0) {
|
||||||
|
tools.message({ type: 'warning', text: '请输入正确的间距!' })
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((options.type && options.spacing != undefined) || options.type == '点') {
|
if ((options.type && options.spacing != undefined) || options.type == '点') {
|
||||||
// BatchModel.computeDis(this)
|
// BatchModel.computeDis(this)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user