修改
This commit is contained in:
@ -33,7 +33,7 @@ class Submerge extends Tools {
|
|||||||
// Submerge.create(this)
|
// Submerge.create(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
static create(that) {
|
static create(that, func) {
|
||||||
that.Draw.start((a, positions) => {
|
that.Draw.start((a, positions) => {
|
||||||
if (!positions || positions.length < 3) {
|
if (!positions || positions.length < 3) {
|
||||||
let _error = '至少需要三个坐标!'
|
let _error = '至少需要三个坐标!'
|
||||||
@ -100,7 +100,7 @@ class Submerge extends Tools {
|
|||||||
|
|
||||||
that.waterLevel = that.options.maxWaterLevel - that.options.minWaterLevel
|
that.waterLevel = that.options.maxWaterLevel - that.options.minWaterLevel
|
||||||
that.options.waterVolume = Number((that.waterLevel * that.area).toFixed(4))
|
that.options.waterVolume = Number((that.waterLevel * that.area).toFixed(4))
|
||||||
|
func && func(that.options.waterVolume)
|
||||||
that.clickCallBack(that.area, that._positions)
|
that.clickCallBack(that.area, that._positions)
|
||||||
// let contentElm = that._DialogObject._element.body
|
// let contentElm = that._DialogObject._element.body
|
||||||
// let pauseBtn = contentElm.getElementsByClassName('pause')[0];
|
// let pauseBtn = contentElm.getElementsByClassName('pause')[0];
|
||||||
@ -111,8 +111,8 @@ class Submerge extends Tools {
|
|||||||
// Submerge.EditBox(that)
|
// Submerge.EditBox(that)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
draw() {
|
draw(func) {
|
||||||
Submerge.create(this)
|
Submerge.create(this, func)
|
||||||
}
|
}
|
||||||
|
|
||||||
static async EditBox(that) {
|
static async EditBox(that) {
|
||||||
|
|||||||
Reference in New Issue
Block a user