mofron-comp-text
Advanced tools
Comparing version 0.7.3 to 0.7.4
29
index.js
@@ -11,9 +11,8 @@ /** | ||
*/ | ||
mofron.comp.Text = class extends mofron.Component { | ||
mf.comp.Text = class extends mf.Component { | ||
constructor (prm_opt) { | ||
constructor (po) { | ||
try { | ||
super(); | ||
super(po); | ||
this.name('Text'); | ||
this.prmOpt(prm_opt); | ||
} catch (e) { | ||
@@ -37,4 +36,11 @@ console.error(e.stack); | ||
/* set text contents */ | ||
/* set contents */ | ||
this.text((null === prm) ? '' : prm); | ||
/* set font */ | ||
let fnt = this.theme().font(0); | ||
if (null !== fnt) { | ||
this.font(fnt, true); | ||
} | ||
} catch (e) { | ||
@@ -46,15 +52,2 @@ console.error(e.stack); | ||
themeConts () { | ||
try { | ||
/* set font theme */ | ||
this.font( | ||
(null === this.theme().font(0)) ? undefined : this.theme().font(0), | ||
true | ||
); | ||
} catch (e) { | ||
console.error(e.stack); | ||
throw e; | ||
} | ||
} | ||
/** | ||
@@ -61,0 +54,0 @@ * text contents setter / getter |
{ | ||
"name": "mofron-comp-text", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"description": "text component for mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7866
171