fix(core): update

This commit is contained in:
2020-11-23 20:41:26 +00:00
parent 5e1a44ad88
commit 7c805a075e
6 changed files with 80 additions and 59 deletions

View File

@ -6,6 +6,8 @@ import { TViewport } from './domtools.breakpoints';
import { Scroller } from './domtools.classes.scroller';
import { delayForRandom } from '@pushrocks/smartdelay';
import { WebSetup } from '@pushrocks/websetup';
import { ElementInstrumenter } from './domtools.classes.elementinstrumenter';
import { ThemeManager } from './domtools.classes.thememanager';
export interface IDomToolsState {
virtualViewport: TViewport;
@ -66,8 +68,8 @@ export class DomTools {
public websetup: WebSetup = new WebSetup({
metaObject: {
title: 'loading...'
}
title: 'loading...',
},
});
public smartstate = new plugins.smartstate.Smartstate();
@ -83,9 +85,13 @@ export class DomTools {
smartdelay: plugins.smartdelay,
};
public scroller: plugins.SweetScroll;
public elementInstrumenter = new ElementInstrumenter();
public deesComms = new plugins.deesComms.DeesComms();
public scroller = new plugins.SweetScroll({
/* some options */
}); // TODO: switch to scroller class
public themeManager = new ThemeManager(this);
private actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(
async (statePart, payload) => {
@ -99,14 +105,7 @@ export class DomTools {
public domReady = plugins.smartpromise.defer();
public globalStylesReady = plugins.smartpromise.defer();
constructor() {
// lets care about third party stuff
this.domToolsReady.promise.then(() => {
this.scroller = new plugins.SweetScroll({
/* some options */
});
});
}
constructor() {}
private runOnceTrackerStringMap = new Stringmap();
private runOnceResultMap = new FastMap();