mofron-comp-header
Advanced tools
Comparing version 0.8.6 to 0.9.0
22
index.js
@@ -18,3 +18,4 @@ /** | ||
this.name('Header'); | ||
this.prmMap('addChild'); | ||
this.sizeType('rem'); | ||
this.prmMap('child'); | ||
this.prmOpt(po); | ||
@@ -49,3 +50,4 @@ } catch (e) { | ||
/* set default config */ | ||
this.size('100%', 50); | ||
this.width('100%'); | ||
this.height(0.5); | ||
this.bind(true); | ||
@@ -55,3 +57,3 @@ this.mainColor(new mf.Color(211,211,211)); | ||
/* child comp is added at horizon layout */ | ||
this.addLayout(new Horizon()); | ||
this.layout([new Horizon()]); | ||
@@ -69,11 +71,11 @@ } catch (e) { | ||
*/ | ||
height (val) { | ||
height (prm, st) { | ||
try { | ||
let ret = super.height(('number' === typeof val) ? (val-1)+'px' : val); | ||
if (undefined !== ret) { | ||
return ret+1; | ||
let ret = super.height(prm, st); | ||
if (undefined === ret) { | ||
this.adom().child()[1].style({ | ||
'height' : (prm + '') + this.sizeType() | ||
}); | ||
} | ||
this.adom().child()[1].style({ | ||
'height' : ('number' === typeof val) ? val+'px' : val | ||
}); | ||
return ret; | ||
} catch (e) { | ||
@@ -80,0 +82,0 @@ console.error(e.stack); |
{ | ||
"name": "mofron-comp-header", | ||
"version": "0.8.6", | ||
"version": "0.9.0", | ||
"description": "header component for mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5746
121