Hi,
When I try to embed a modeler inside my application (using bower) I get the following errors:
The modeler is initialized with the following:
var BpmnJS = window.BpmnJS;
// create renderer
var renderer = new BpmnJS ({
container: '#canvas',
height: 400
});
And I create the diagram using the following method:
renderer.createDiagram(function(){}); //no callback
As you can see, this is a very basic example. What might be the problem?
Thanks.
Ricardo
nikku
February 24, 2015, 11:42pm
#2
Any chance you can put the full example on GitHub / jsfiddle?
@nikku I modified the simple-bower example to have modelling capabilities by changing the line
<script src="../bower_components/bpmn-js/dist/bpmn-vierwer.js"></script>
to
<script src="../bower_components/bpmn-js/dist/bpmn-modeler.js"></script>
and I get the same errors. Am I doing something wrong?
Doh! Ok. Nevermind! I forgot to include hammer.js in the simple-bower example. It’s working now. I’ll try to figure it out what I am missing…
I’ve figured it out. The problem was that I was working with an incompatible version of Snap.svg (0.2.0) and now that I’ve updated it I no longer have the problem.
For posterity sake, the problem was resolved by doing:
bower cache clean && bower install bpmn-js
nikku
February 26, 2015, 8:33am
#6
Nice to hear you could track down the issue.