Hi,
I am working with angular 4 project. I am using dmn-js modeler to show the rules in front-end. I am not able to populate dmn-js in particular div class=“canvas” container.
THis is how I tried in my application:
this.viewer = new dmn({container: ‘body’});
console.log(this.viewer);
this.viewer.importXML( res[’_body’],function(err){
This change works well if I test with the online dmn.js editor styles but that shoulnt be the case
Will the styles present for the online dmn-js editor will be present in the library? Do I need to write any customized styles for my dmn table to display in my UI.
If you want the viewer/modeler to be displayed in the desired container you have to specify it. You specified { container: 'body' } which is the default option.
You’d have to do this:
var myContainer = document.getElementsByClassName('canvas');
this.viewer = new dmn({ container: myContainer });
Hi Phillip, @philippfromme I did manage to get that into my required container but the problem is, since it is getting displayed in the container that is present in the bottom of page it not going beyond the scrollable limit. PFA screenshot