1
2jQuery(window).load(function () {
3    runRigrr();
4});
5
6function runRigrr() {
7    var BPMN = document.getElementById("rigrr_bpmn").value;
8    try {
9        var lib = new com.rapilabs.Rigrr('rigrr_canvas');
10        lib.drawDiagram("rigrr_canvas", BPMN);
11
12
13        $("#rigrr_canvas").find("svg").attr('id', 'rigrr_svg');
14        svgPanZoom('#rigrr_svg', {
15            zoomEnabled: true,
16            controlIconsEnabled: true
17        });
18    }
19    catch (err) {
20        txt = "There was an error on this page.\n\n";
21        txt += "Error description: " + err.message + "\n\n";
22        txt += "Click OK to continue.\n\n";
23        alert(txt);
24    }
25}
26