mofron-comp-appbase
Advanced tools
Comparing version 0.1.9 to 0.2.0
44
index.js
@@ -44,4 +44,5 @@ /** | ||
/* contents */ | ||
this.addChild(this.contents()); | ||
this.target(this.contents().target()); | ||
let conts = new mf.Component({width : '100%'}); | ||
this.addChild(conts); | ||
this.target(conts.target()); | ||
@@ -56,3 +57,3 @@ /* sync height-length with window */ | ||
if (true === p.winHeight()) { | ||
p.contents().height(set_hei); | ||
p.getChild(true)[2].height(set_hei); | ||
} | ||
@@ -76,11 +77,2 @@ } catch (e) { | ||
addLayout (lo) { | ||
try { | ||
return this.child()[2].addLayout(lo); | ||
} catch (e) { | ||
console.error(e.stack); | ||
throw e; | ||
} | ||
} | ||
themeConts () { | ||
@@ -132,24 +124,8 @@ try { | ||
contents (cnt) { | ||
try { | ||
if (undefined === cnt) { | ||
/* getter */ | ||
if (3 > this.child().length) { | ||
return new mf.Component({width : '100%'}); | ||
} | ||
return this.child()[2]; | ||
} | ||
/* setter */ | ||
this.addChild(cnt); | ||
} catch (e) { | ||
console.error(e.stack); | ||
throw e; | ||
} | ||
} | ||
background (val) { | ||
try { | ||
let bgd = this.getChild(true)[1]; | ||
if (undefined === val) { | ||
/* getter */ | ||
return this.child()[1]; | ||
return (0 === bgd.child().length) ? null : bgd.child()[0]; | ||
} | ||
@@ -161,3 +137,3 @@ /* setter */ | ||
val.size('100%','100%'); | ||
this.child()[1].addChild(val); | ||
bgd.addChild(val); | ||
} catch (e) { | ||
@@ -178,8 +154,10 @@ console.error(e.stack); | ||
} | ||
/* setter */ | ||
let conts = this.getChild(true)[2]; | ||
if (true === prm) { | ||
this.contents().height( | ||
this.conts.height( | ||
window.innerHeight - this.header().height() | ||
); | ||
} else { | ||
this.contents().height(null); | ||
this.conts().height(null); | ||
} | ||
@@ -186,0 +164,0 @@ this.m_winhei = prm; |
{ | ||
"name": "mofron-comp-appbase", | ||
"version": "0.1.9", | ||
"version": "0.2.0", | ||
"description": "application base component for mofron", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7777
167