@smartface/contx
Advanced tools
Comparing version 2.3.0-beta.1 to 2.3.0-beta.2
@@ -227,5 +227,3 @@ "use strict"; | ||
case 'removeChild': | ||
console.log("size1 : ", context.actors.collection.size); | ||
context.remove(target); | ||
console.log("size2 : ", context.actors.collection.size); | ||
return newState; | ||
@@ -232,0 +230,0 @@ |
@@ -87,2 +87,11 @@ "use strict"; | ||
page.onOrientationChange = (0, _patchMethod["default"])(page, "onOrientationChange", onOrientationChange); | ||
page.loadTheme = function () { | ||
return loadTheme.call(page); | ||
}; | ||
page.unloadTheme = function () { | ||
return unloadTheme.call(page); | ||
}; | ||
page.__name__ = name; // hides unload logic | ||
@@ -95,2 +104,10 @@ // page.onUnload = patchMethod(page, "onUnload", onPageUnload); | ||
function loadTheme() { | ||
this.themeContext = Application.theme((0, _pageContext["default"])(page, name, null, null), name); | ||
} | ||
function unloadTheme() { | ||
this.themeContext && this.themeContext(null); | ||
} | ||
function onShow(superOnShow, data) { | ||
@@ -115,3 +132,3 @@ if (!this.themeContext) { | ||
superOnLoad && superOnLoad(); | ||
this.themeContext = Application.theme((0, _pageContext["default"])(page, name, null, null), name); | ||
loadTheme.call(this); | ||
updateHeaderBar.call(this); | ||
@@ -118,0 +135,0 @@ } |
@@ -8,6 +8,6 @@ "use strict"; | ||
function patchMethod(scope, method, bindingfFunc) { | ||
return bindingfFunc.bind(scope, typeof scope[method] === "function" ? scope[method].bind(scope) : null); | ||
function patchMethod(scope, bindingFunc) { | ||
return bindingFunc.bind(scope, typeof scope[bindingFunc.name] === "function" ? scope[bindingFunc.name].bind(scope) : null); | ||
} | ||
module.exports = exports["default"]; |
{ | ||
"name": "@smartface/contx", | ||
"version": "2.3.0-beta.1", | ||
"version": "2.3.0-beta.2", | ||
"description": "Context Manager", | ||
@@ -5,0 +5,0 @@ "scripts": { |
100414
2076