parent
a74c87af3f
commit
28871bcdaf
|
@ -7,8 +7,6 @@ var inherits = require('inherits'),
|
|||
every = require('lodash/collection/every'),
|
||||
some = require('lodash/collection/some');
|
||||
|
||||
var Ids = require('ids');
|
||||
|
||||
var BaseRenderer = require('diagram-js/lib/draw/BaseRenderer'),
|
||||
TextUtil = require('diagram-js/lib/util/Text'),
|
||||
DiUtil = require('../util/DiUtil');
|
||||
|
@ -32,6 +30,9 @@ var rotate = require('diagram-js/lib/util/SvgTransformUtil').rotate,
|
|||
transform = require('diagram-js/lib/util/SvgTransformUtil').transform,
|
||||
translate = require('diagram-js/lib/util/SvgTransformUtil').translate;
|
||||
|
||||
var Ids = require('ids'),
|
||||
RENDERER_IDS = new Ids();
|
||||
|
||||
var TASK_BORDER_RADIUS = 10;
|
||||
var INNER_OUTER_DIST = 3;
|
||||
|
||||
|
@ -45,7 +46,7 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) {
|
|||
|
||||
BaseRenderer.call(this, eventBus, priority);
|
||||
|
||||
var randomId = new Ids().next();
|
||||
var rendererId = RENDERER_IDS.next();
|
||||
|
||||
var textUtil = new TextUtil({
|
||||
style: LABEL_STYLE,
|
||||
|
@ -104,7 +105,7 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) {
|
|||
}
|
||||
|
||||
function marker(type, fill, stroke) {
|
||||
var id = type + '-' + fill + '-' + stroke + '-' + randomId;
|
||||
var id = type + '-' + fill + '-' + stroke + '-' + rendererId;
|
||||
|
||||
if (!markers[id]) {
|
||||
createMarker(type, fill, stroke);
|
||||
|
@ -114,7 +115,7 @@ function BpmnRenderer(eventBus, styles, pathMap, canvas, priority) {
|
|||
}
|
||||
|
||||
function createMarker(type, fill, stroke) {
|
||||
var id = type + '-' + fill + '-' + stroke + '-' + randomId;
|
||||
var id = type + '-' + fill + '-' + stroke + '-' + rendererId;
|
||||
|
||||
if (type === 'sequenceflow-end') {
|
||||
var sequenceflowEnd = svgCreate('path');
|
||||
|
|
Loading…
Reference in New Issue