????
Current Path : /home2/morganrand/backup.morganrand.com/centerpiece_party_favor_designer/js/ |
Current File : /home2/morganrand/backup.morganrand.com/centerpiece_party_favor_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 Arial", "#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(20*this.scl); console.log("fontSize - " + fontSize); fontSize = fontSize < 16 ? 16 : fontSize; lbl.lineWidth = bwd - (40*this.scl); lbl.font = fontSize+"px Arial"; 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 - tht) / 2; } window.LimitMessage = createjs.promote(LimitMessage, "Container"); }(window));