Improved AbstractScreen properties

Improved settings screens
Views:
* sDefaultScope & sCurrentScope to sub-class keyScope
* drop viewModelVisible
* rename viewModelTemplateID to templateID
* rename viewModelPosition to viewType
This commit is contained in:
djmaze 2021-09-22 20:17:44 +02:00
parent 11f69ef9e4
commit 8be4c384bb
27 changed files with 136 additions and 196 deletions

View file

@ -2,23 +2,9 @@ import { isArray, arrayLength } from 'Common/Utils';
export class AbstractScreen {
constructor(screenName, viewModels = []) {
this.oCross = null;
this.sScreenName = screenName;
this.aViewModels = isArray(viewModels) ? viewModels : [];
}
/**
* @returns {Array}
*/
get viewModels() {
return this.aViewModels;
}
/**
* @returns {string}
*/
screenName() {
return this.sScreenName;
this.__cross = null;
this.screenName = screenName;
this.viewModels = isArray(viewModels) ? viewModels : [];
}
/**
@ -28,12 +14,13 @@ export class AbstractScreen {
return null;
}
/**
* @returns {?Object}
*/
get __cross() {
return this.oCross;
}
/*
onBuild(viewModelDom) {}
onShow() {}
onHide() {}
__started
__builded
*/
/**
* @returns {void}
@ -48,7 +35,7 @@ export class AbstractScreen {
routes.forEach(item => item && route && (route.addRoute(item[0], fMatcher).rules = item[1]));
this.oCross = route;
this.__cross = route;
}
}
}