Prevents canvas bug.

This commit is contained in:
Aaron Louie 2020-03-23 13:01:31 -04:00
parent 3886c37c72
commit 87dd8f7dc3
1 changed files with 5 additions and 1 deletions

View File

@ -206,7 +206,11 @@ export class DiagramComponent implements ControlValueAccessor, AfterViewInit {
this.modeler.on('import.done', ({error}) => {
if (!error) {
this.modeler.getActiveViewer().get('canvas').zoom('fit-viewport');
const activeView = this.modeler.getActiveView();
if (activeView.type === 'drd') {
this.modeler.getActiveViewer().get('canvas').zoom('fit-viewport');
}
window.scrollTo({
top: 0,
left: 0,