fix(core): update
This commit is contained in:
		| @@ -31,7 +31,15 @@ export class DomTools { | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   public smartstate = new plugins.smartstate.Smartstate(); |   public smartstate = new plugins.smartstate.Smartstate(); | ||||||
|   public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools'); |   public domToolsStatePart = this.smartstate.getStatePart<IDomToolsState>('domtools', { | ||||||
|  |     virtualViewport: 'native' | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   public actionSetVirtualViewport = this.domToolsStatePart.createAction<TViewport>(async (statePart, payload) => { | ||||||
|  |     const currentState = statePart.getState(); | ||||||
|  |     currentState.virtualViewport = payload; | ||||||
|  |     return currentState; | ||||||
|  |   }); | ||||||
|  |  | ||||||
|   public domToolsReady = plugins.smartpromise.defer(); |   public domToolsReady = plugins.smartpromise.defer(); | ||||||
|   public domReady = plugins.smartpromise.defer(); |   public domReady = plugins.smartpromise.defer(); | ||||||
| @@ -46,7 +54,9 @@ export class DomTools { | |||||||
|     bodyElement: null |     bodyElement: null | ||||||
|   }; |   }; | ||||||
|  |  | ||||||
|   constructor() {} |   constructor() { | ||||||
|  |      | ||||||
|  |   } | ||||||
|  |  | ||||||
|   public async setGlobalStyles(stylesText: string) { |   public async setGlobalStyles(stylesText: string) { | ||||||
|     await this.domReady.promise; |     await this.domReady.promise; | ||||||
| @@ -82,5 +92,7 @@ export class DomTools { | |||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   setVirtualViewport() {} |   setVirtualViewport(environmentArg: TViewport) { | ||||||
|  |     this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg); | ||||||
|  |   } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user