diff --git a/entry/src/main/js/default/common/component/LVBattery/LVBattery.js b/entry/src/main/js/default/common/component/LVBattery/LVBattery.js index 61a4eb762b2b55f2735793d55ccf09f40d2614f0..cae4d511927001a59a5046e7216eecb33f9d5a5d 100644 --- a/entry/src/main/js/default/common/component/LVBattery/LVBattery.js +++ b/entry/src/main/js/default/common/component/LVBattery/LVBattery.js @@ -90,6 +90,7 @@ export default { this.isNotAnim = false }, + //绘制电池的上半部分 drawHead(ctx) { ctx.fillStyle = this.controller.getViewColor() ctx.beginPath(); @@ -99,6 +100,7 @@ export default { ctx.closePath(); ctx.fill() }, + //绘制电池的下半部分 drawBody(ctx) { ctx.beginPath(); ctx.strokeStyle = this.controller.getViewColor() @@ -112,6 +114,7 @@ export default { ctx.lineTo(this.rectFBody.left, this.rectFBody.top + this.mBodyCorner) ctx.stroke(); }, + //绘制电池下半部分的数字 drawValue(ctx) { this.rectFBodyValue.top = this.rectFBodyValue.bottom - (this.rectFBodyValue.bottom - this.rectFBody.top - this.mBatterySpace) * this.controller.getAnimValue() ctx.beginPath();