From b4568a464fbe712cadf15e48c3b033bc7761c1de Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期一, 12 十一月 2018 12:22:22 +0800 Subject: [PATCH] 修改一次和二次电压显示除10 提交*10 --- gx_tieta/WebRoot/js/elecircle.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/gx_tieta/WebRoot/js/elecircle.js b/gx_tieta/WebRoot/js/elecircle.js index 79573ac..bf440a4 100644 --- a/gx_tieta/WebRoot/js/elecircle.js +++ b/gx_tieta/WebRoot/js/elecircle.js @@ -1125,6 +1125,46 @@ this.opts.push(txtInfor); } +// 缁樺埗鍥剧墖 +EleCircle.prototype.drawImg = function(options) { + var defaluts = { + img: '', + startX: 0, + startY: 0, + width: 30, + height: 30, + lineWidth: 4, + fontSize: 14, + fontWeight: '', + strokeStyle: '#000', + fillStyle: '#000', + isShow: true, + name:'', + id: '', + }; + + var opts = $.extend({}, defaluts, options || {}); + + if(opts.img != '' && opts.isShow) { + this.context.drawImage(opts.img, opts.startX, opts.startY, opts.width, opts.height); + + this.context.lineWidth = opts.lineWidth; + this.context.strokeStyle = opts.strokeStyle; + this.context.fillStyle = opts.fillStyle; + this.context.font = opts.fontSize+'px Arial'; + this.context.fillText(opts.name, opts.startX+30, opts.startY+25); + } + + // 瀛樺偍鍐呭 + var txtInfor = { + options: opts, + type:'drawImg', + }; + this.opts.push(txtInfor); + + +}; + // 閲嶆柊缁樺埗鍥� EleCircle.prototype.redraw =function() { this.context.clearRect(0, 0, this.canvas.width, this.canvas.height); -- Gitblit v1.9.1