修改tip提示语
This commit is contained in:
@ -96,7 +96,7 @@ class DrawPolyline extends Draw {
|
||||
super.start()
|
||||
let into
|
||||
YJ.Measure.SetMeasureStatus(true)
|
||||
this.tip = new MouseTip('左键确定,右键结束;CTRL+右键撤销', this.sdk)
|
||||
this.tip = new MouseTip(this.tipText || '左键确定,右键结束;CTRL+右键撤销', this.sdk)
|
||||
this.event = new MouseEvent(this.sdk)
|
||||
this.positions = []
|
||||
this.points_ids = [] //存放左键点击时临时添加的point的id
|
||||
@ -137,6 +137,9 @@ class DrawPolyline extends Draw {
|
||||
cb(null, positions, smoothPos)
|
||||
this.end()
|
||||
}
|
||||
else {
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
this.event.mouse_right((movement, cartesian) => {
|
||||
if(into === '2D') {
|
||||
@ -175,6 +178,7 @@ class DrawPolyline extends Draw {
|
||||
if (this.points_ids.length > 1) {
|
||||
this.remove_entity(this.points_ids.pop()) //移除point
|
||||
cache_positions.pop()
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
|
||||
@ -186,6 +190,7 @@ class DrawPolyline extends Draw {
|
||||
this.remove_entity(this.points_ids.pop()) //移除point
|
||||
cache_positions.pop()
|
||||
this.positions = cache_positions.concat(cartesian)
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
|
||||
@ -225,6 +230,7 @@ class DrawPolyline extends Draw {
|
||||
cache_positions.push(cartesian)
|
||||
this.points_ids.push(this.create_point(cartesian, this.viewer))
|
||||
this.positions = cache_positions.concat(cartesian)
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -287,6 +293,7 @@ class DrawPolyline extends Draw {
|
||||
if (this.points_ids.length > 1) {
|
||||
this.remove_entity(this.points_ids.pop()) //移除point
|
||||
cache_positions.pop()
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
|
||||
@ -337,6 +344,7 @@ class DrawPolyline extends Draw {
|
||||
cache_positions.push(cartesian)
|
||||
this.points_ids.push(this.create_point(cartesian, this._sdk2D.viewer))
|
||||
this.positions = cache_positions.concat(cartesian)
|
||||
cb(cache_positions.length)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user