File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
@import "../../../node_modules/@dhx/trial-diagram/codebase/diagram.min.css" ;
2
2
3
3
.widget {
4
- position : relative;
5
4
width : 100% ;
6
5
height : 100% ;
7
6
}
Original file line number Diff line number Diff line change @@ -20,16 +20,15 @@ import { IDefaultEditorConfig } from "@dhx/trial-diagram/codebase/types/ts-diagr
20
20
export class DiagramComponent implements OnInit , OnDestroy {
21
21
@ViewChild ( "here" , { static : true } ) diagramContainer ! : ElementRef ;
22
22
23
- private _diagram : any ;
23
+ private _diagram : DiagramEditor | null = null ;
24
24
25
25
ngOnInit ( ) {
26
26
const data = getData ( ) ;
27
- let diagram = new DiagramEditor ( this . diagramContainer . nativeElement , { type : "default" } as IDefaultEditorConfig ) ;
28
- diagram . parse ( data ) ;
29
- this . _diagram = diagram ;
27
+ this . _diagram = new DiagramEditor ( this . diagramContainer . nativeElement , { type : "default" } as IDefaultEditorConfig ) ;
28
+ this . _diagram . parse ( data ) ;
30
29
}
31
30
32
31
ngOnDestroy ( ) : void {
33
- this . _diagram . destructor ( ) ;
32
+ this . _diagram ? .destructor ( ) ;
34
33
}
35
34
}
You can’t perform that action at this time.
0 commit comments