Bpmn-js-token-simulation integration


#1

I would like to extend my modeler with token simulation:

I import the module like this:

import tokenSimulation from 'bpmn-js-token-simulation';

but it throws this:

Uncaught TypeError: Cannot set property 'SVG' of undefined
    at index.js:72203
    at index.js:72194
    at Object.529 (index.js:72200)
    at o (index.js:1)
    at index.js:1
    at Object.17.../util/ElementHelper (index.js:1683)
    at o (index.js:1)
    at index.js:1
    at Object.75../animation/Animation (index.js:5056)
    at o (index.js:1)

I think I miss something obvious but please help.


#2

The error raised at this line:
svg.js:25
which is the following:
var SVG = this.SVG = function(element) {

So ‘this’ is undefined but I don’t know why.


#3

Issue is already reported here: https://github.com/svgdotjs/svg.js/issues/866

I think I solve it by forking the lib until they fix it in version 3.0.0.