????
Current Path : /home2/morganrand/backup.morganrand.com/centerpiece-designer/js/ |
Current File : /home2/morganrand/backup.morganrand.com/centerpiece-designer/js/LimitMessage.js |
(function (window) { function LimitMessage() { this.Container_constructor(); // super call this.setupUi(); } var p = createjs.extend(LimitMessage, createjs.Container); // public properties: p.scl; p.lbl; p.htBg; // public methods: p.setupUi = function () { this.lbl = new createjs.Text("", "20px Courier", "#ff0000"); this.htBg = new createjs.Shape(); this.addChild(this.htBg, this.lbl); } p.setScale = function(sclParam) { this.scl = sclParam; var bwd = 400*this.scl; var bht = 200*this.scl; var lbl = this.lbl; var htBg = this.htBg; var fontSize = Math.round(40*this.scl); console.log("fontSize - " + fontSize); fontSize = fontSize < 16 ? 16 : fontSize; lbl.lineWidth = bwd + (80*this.scl); lbl.font = "bold "+fontSize+"px Courier"; lbl.text = settingObjects.signUpMessage; htBg.graphics.clear(); // htBg.graphics.beginFill("#000000CC",).drawRect(0, 0, bwd, bht); var twd = lbl.lineWidth; var tht = lbl.getMeasuredHeight(); // console.log("twd = " + twd); lbl.x = (bwd - twd) / 2; lbl.y = (bht + 20); } window.LimitMessage = createjs.promote(LimitMessage, "Container"); }(window));