Hello
I added int tsconfig.json
"allowJs": true,
"noImplicitAny": false,
import {
AfterContentInit,
Component,
ElementRef,
Input,
OnChanges,
OnDestroy,
Output,
ViewChild,
SimpleChanges,
EventEmitter,
OnInit
} from '@angular/core';
import {HttpClient} from "@angular/common/http";
import * as BpmnJS from 'bpmn-js/dist/bpmn-modeler.production.min.js';
import {from, map, Observable, Subscription, switchMap, throwError} from 'rxjs';
@Component({
selector: 'app-planla',
templateUrl: './planla.component.html',
styleUrls: ['./planla.component.less']
})
export class PlanlaComponent implements OnInit {
private bpmnJS: BpmnJS;
constructor(private http: HttpClient) {
this.bpmnJS = new BpmnJS();
let url = "https://cdn.staticaly.com/gh/bpmn-io/bpmn-js-examples/dfceecba/starter/diagram.bpmn";
this.bpmnJS.get('canvas').zoom('fit-viewport');
this.loadUrl(url);
}
private importDiagram(xml: string): Observable<{warnings: Array<any>}> {
return from(this.bpmnJS.importXML(xml) as Promise<{warnings: Array<any>}>);
}
loadUrl(url: string): Subscription {
return (this.http.get(url, { responseType: 'text' }).pipe(
switchMap((xml: string) => this.importDiagram(xml)),
map(warnings => warnings),).subscribe(
(warnings) => {
console.log(warnings);
},
(err) => {
console.log(err);
}
)
);
}
ngOnInit(): void {
}
}
}
Error: attribute transform: Expected number, “matrix(1,0,0,1,NaN,NaN)”.
vn @ bpmn-modeler.production.min.js:7
i am getting error. my purpose is just to get image and say hello world