mofron-comp-appbase
Advanced tools
Comparing version 0.1.5 to 0.1.6
38
index.js
@@ -36,7 +36,6 @@ /** | ||
let hei = window.innerHeight - this.header().height(); | ||
/* background */ | ||
let bg = new mf.Component({ | ||
style : { 'position' : 'fixed' }, | ||
height : hei | ||
style : { 'position' : 'fixed' }, | ||
height : window.innerHeight - this.header().height() | ||
}); | ||
@@ -46,10 +45,6 @@ this.addChild(bg); | ||
/* contents */ | ||
let conts = new mf.Component({ | ||
style : { 'position' : 'relative', | ||
'z-index' : 10 }, | ||
}); | ||
this.addChild(conts); | ||
this.target(conts.target()); | ||
this.addChild(this.contents()); | ||
this.target(this.contents().target()); | ||
/* sync height-length with window */ | ||
mf.func.addResizeWin( | ||
@@ -78,2 +73,11 @@ (p) => { | ||
addLayout (lo) { | ||
try { | ||
return this.child()[2].addLayout(lo); | ||
} catch (e) { | ||
console.error(e.stack); | ||
throw e; | ||
} | ||
} | ||
themeConts () { | ||
@@ -129,11 +133,9 @@ try { | ||
/* getter */ | ||
let chd = this.child(); | ||
let ret = new Array(); | ||
for (let cidx in chd) { | ||
if (2 >= cidx) { | ||
continue; | ||
} | ||
ret.push(chd[cidx]); | ||
if (3 > this.child().length) { | ||
return new mf.Component({ | ||
style : { 'position' : 'fixed' }, | ||
height : window.innerHeight - this.header().height() | ||
}); | ||
} | ||
return ret; | ||
return this.child()[2]; | ||
} | ||
@@ -140,0 +142,0 @@ /* setter */ |
{ | ||
"name": "mofron-comp-appbase", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "application base component for mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7533
166