smartClient 封装语法

来源:互联网 发布:人工智能修道士与野人 编辑:程序博客网 时间:2024/06/10 20:09

按照执行顺序进行代码编写

isc.ClassFactory.defineClass("M3Vcode", "Canvas");isc.M3Vcode.addProperties({initWidget: function() {//执行顺序 33333this.Super("initWidget", arguments);var it = this;},getInnerHTML: function() { //执行顺序 222var html = '<div id="' + this.getCanvasName() + '_Vcode" style="background-color: red;"></div>';return html;},draw: function() {//执行顺序 4444if (!this.readyToDraw()) return this;this.Super("draw", arguments);var it = this;var temp = document.getElementById(this.getCanvasName() + '_Vcode');temp.style.width = this.width+"px";temp.style.height = this.height+"px";it.initVcode();},resized: function() { //执行顺序 1111111if (this.isDraw) this.markForRedraw()}});

0 0
原创粉丝点击