fix(core): update

This commit is contained in:
2020-11-04 18:35:45 +00:00
parent 8a8ee5cd7b
commit 7d884f6556
3 changed files with 105 additions and 57 deletions

View File

@ -5,6 +5,7 @@ import { TViewport } from './domtools.breakpoints';
import { Scroller } from './domtools.classes.scroller';
import { delayForRandom } from '@pushrocks/smartdelay';
import { WebSetup } from '@pushrocks/websetup';
export interface IDomToolsState {
virtualViewport: TViewport;
@ -63,6 +64,8 @@ export class DomTools {
bodyElement: null,
};
public websetup: WebSetup;
public smartstate = new plugins.smartstate.Smartstate();
public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', {
virtualViewport: 'native',
@ -142,7 +145,7 @@ export class DomTools {
}
public async setWebsiteInfo(optionsArg: plugins.websetup.IWebSetupConstructorOptions) {
const websetup = new plugins.websetup.WebSetup(optionsArg);
await websetup.setup();
this.websetup = new plugins.websetup.WebSetup(optionsArg);
await this.websetup.readyPromise;
}
}