Skip to content
Snippets Groups Projects
Commit 5c97a578 authored by Xiao Gui's avatar Xiao Gui Committed by xgui3783
Browse files

chore: house keeping

parent 1b0f0ba2
No related branches found
No related tags found
No related merge requests found
......@@ -31,11 +31,8 @@ export class WidgetServices{
clearAllWidgets(){
[...this.widgetComponentRefs].forEach((cr:ComponentRef<WidgetUnit>) => {
if(!cr.instance.persistency) cr.destroy()
})
// this.floatingContainer.clear()
// this.dockedContainer.clear()
this.clickedListener.forEach(s=>s.unsubscribe())
}
......@@ -47,11 +44,6 @@ export class WidgetServices{
: _option.state === 'docked'
? this.dockedContainer.insert(component.hostView)
: this.floatingContainer.insert(component.hostView)
// const component = _option.state === 'floating' ?
// this.floatingContainer.createComponent(this.widgetUnitFactory) :
// _option.state === 'docked' ?
// this.dockedContainer.createComponent(this.widgetUnitFactory) :
// Error('option.state has to be either floating or docked')
if(component.constructor === Error){
throw component
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment