修改线没有点击确定没有保存速率问题
This commit is contained in:
@ -122,6 +122,7 @@ class PolylineObject extends Base {
|
||||
this.operate = {}
|
||||
this.nodePoints = []
|
||||
this.unitNum = 0
|
||||
this.inputSpeed = (options.speed && Math.pow(options.speed, -1) * 100) || 10
|
||||
this.Dialog = _Dialog
|
||||
if (!this.options.positions || this.options.positions.length < 2) {
|
||||
this._error = '线段最少需要两个坐标!'
|
||||
@ -150,7 +151,10 @@ class PolylineObject extends Base {
|
||||
}
|
||||
set color(v) {
|
||||
this.options.color = v || '#ff0000'
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
// this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, params)
|
||||
if (this._elms.color) {
|
||||
this._elms.color.forEach((item, i) => {
|
||||
let colorPicker = new YJColorPicker({
|
||||
@ -177,9 +181,13 @@ class PolylineObject extends Base {
|
||||
}
|
||||
|
||||
set speed(v) {
|
||||
// this.options.speed = v
|
||||
this.options.speed = v !== 0 ? Math.pow(v, -1) * 100 : 0
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.options.speed = v
|
||||
this.inputSpeed = v !== 0 ? Math.pow(v, -1) * 100 : 0
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
// this.options.speed = v !== 0 ? Math.pow(v, -1) * 100 : 0
|
||||
// this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, params)
|
||||
}
|
||||
get dashSize() {
|
||||
return this.options.dashSize
|
||||
@ -187,7 +195,10 @@ class PolylineObject extends Base {
|
||||
|
||||
set dashSize(v) {
|
||||
this.options.dashSize = v
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
// this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, params)
|
||||
}
|
||||
|
||||
get rotate() {
|
||||
@ -203,7 +214,10 @@ class PolylineObject extends Base {
|
||||
})
|
||||
|
||||
this.options.rotate = v
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
// this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, params)
|
||||
}
|
||||
|
||||
get space() {
|
||||
@ -212,7 +226,10 @@ class PolylineObject extends Base {
|
||||
|
||||
set space(v) {
|
||||
this.options.space = v
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
// this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, this.options)
|
||||
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type, this.entity, params)
|
||||
}
|
||||
|
||||
get length() {
|
||||
@ -454,13 +471,15 @@ class PolylineObject extends Base {
|
||||
break
|
||||
}
|
||||
}
|
||||
let params = { ...this.options }
|
||||
params.speed = this.inputSpeed
|
||||
this.entity &&
|
||||
this.entity.polyline &&
|
||||
(this.entity.polyline.material = this.getMaterial(
|
||||
this.options.color,
|
||||
this.options.type,
|
||||
this.entity,
|
||||
this.options
|
||||
params
|
||||
))
|
||||
}
|
||||
get noseToTail() {
|
||||
@ -1329,11 +1348,13 @@ class PolylineObject extends Base {
|
||||
|
||||
that.entity.polyline.oriWidth = that.options.width
|
||||
that.judgeLine(that.entity, that.options)
|
||||
let params = { ...that.options }
|
||||
params.speed = that.inputSpeed
|
||||
that.entity.polyline.material = that.getMaterial(
|
||||
that.options.color,
|
||||
that.options.type,
|
||||
that.entity,
|
||||
that.options
|
||||
params
|
||||
)
|
||||
that.sdk._entityZIndex++
|
||||
PolylineObject.createLabel(that)
|
||||
|
@ -598,7 +598,6 @@ class Tools {
|
||||
if (entity) {
|
||||
arr[type + ''] ? (entity.polyline.width = entity.polyline.oriWidth + arr[type + '']) : (entity.polyline.width = entity.polyline.oriWidth)
|
||||
}
|
||||
|
||||
switch (Number(type)) {
|
||||
|
||||
case 1: //虚线
|
||||
|
Reference in New Issue
Block a user