Avoid applying CSS multiple times (#4784)

* Move the applyStyleFromScope to onLoaded, when the views are created and id or className properties are set the CSS selectors are queried and applied multiple times

* Condense the changes when applying properties
This commit is contained in:
Panayot Cankov
2017-09-25 18:32:00 +03:00
committed by SvetoslavTsenov
parent b0577728be
commit 6d7c1ff295
25 changed files with 536 additions and 524 deletions

View File

@@ -49,9 +49,9 @@ export function getCurrentPage(): Page {
function applySelectors(view: View) {
let currentPage = getCurrentPage();
if (currentPage) {
let styleScope = currentPage._getStyleScope();
let styleScope = currentPage._styleScope;
if (styleScope) {
styleScope.applySelectors(view);
styleScope.matchSelectors(view);
}
}
}