bpmn-js 9.0.0-subprocesses.1 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/assets/bpmn-js.css +69 -14
- package/dist/assets/diagram-js.css +81 -78
- package/dist/bpmn-modeler.development.js +2897 -1810
- package/dist/bpmn-modeler.production.min.js +8 -8
- package/dist/bpmn-navigated-viewer.development.js +1458 -1101
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +1457 -1100
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/lib/BaseViewer.js +1 -1
- package/lib/Viewer.js +2 -2
- package/lib/draw/BpmnRenderer.js +303 -373
- package/lib/features/auto-resize/BpmnAutoResizeProvider.js +6 -0
- package/lib/features/copy-paste/BpmnCopyPaste.js +1 -0
- package/lib/features/di-ordering/BpmnDiOrdering.js +15 -11
- package/lib/features/drilldown/DrilldownBreadcrumbs.js +122 -0
- package/lib/features/drilldown/DrilldownCentering.js +118 -0
- package/lib/features/drilldown/DrilldownOverlayBehavior.js +181 -0
- package/lib/features/drilldown/SubprocessCompatibility.js +201 -0
- package/lib/features/drilldown/index.js +17 -0
- package/lib/features/label-editing/LabelEditingProvider.js +1 -1
- package/lib/features/label-editing/cmd/UpdateLabelHandler.js +29 -2
- package/lib/features/modeling/BpmnFactory.js +5 -1
- package/lib/features/modeling/BpmnUpdater.js +43 -1
- package/lib/features/modeling/ElementFactory.js +4 -0
- package/lib/features/modeling/behavior/CreateParticipantBehavior.js +59 -84
- package/lib/features/modeling/behavior/DropOnFlowBehavior.js +2 -2
- package/lib/features/modeling/behavior/RemoveEmbeddedLabelBoundsBehavior.js +34 -0
- package/lib/features/modeling/behavior/SubProcessPlaneBehavior.js +557 -0
- package/lib/features/modeling/behavior/ToggleCollapseConnectionBehaviour.js +74 -0
- package/lib/features/modeling/behavior/UnclaimIdBehavior.js +3 -1
- package/lib/features/modeling/behavior/index.js +27 -18
- package/lib/features/modeling/cmd/SetColorHandler.js +23 -6
- package/lib/features/modeling/cmd/UpdateCanvasRootHandler.js +4 -2
- package/lib/features/modeling/util/ModelingUtil.js +2 -20
- package/lib/features/ordering/BpmnOrderingProvider.js +3 -3
- package/lib/features/palette/PaletteProvider.js +1 -1
- package/lib/features/popup-menu/ReplaceMenuProvider.js +1 -1
- package/lib/import/BpmnImporter.js +17 -60
- package/lib/import/Importer.js +130 -10
- package/lib/util/DrilldownUtil.js +66 -0
- package/lib/util/ModelUtil.js +19 -0
- package/package.json +2 -2
- package/test/helper/index.js +1 -6
- package/lib/features/subprocess-navigation/SubprocessCentering.js +0 -55
- package/lib/features/subprocess-navigation/SubprocessCompatibility.js +0 -135
- package/lib/features/subprocess-navigation/SubprocessElements.js +0 -55
- package/lib/features/subprocess-navigation/SubprocessFlows.js +0 -109
- package/lib/features/subprocess-navigation/SubprocessOverlays.js +0 -104
- package/lib/features/subprocess-navigation/index.js +0 -18
package/lib/draw/BpmnRenderer.js
CHANGED
|
@@ -382,68 +382,68 @@ export default function BpmnRenderer(
|
|
|
382
382
|
return drawPath(parentGfx, path, assign({ 'data-marker': type }, attrs));
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
function as(type) {
|
|
386
|
-
return function(parentGfx, element, attrs) {
|
|
387
|
-
return handlers[type](parentGfx, element, attrs);
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
|
|
391
385
|
function renderer(type) {
|
|
392
386
|
return handlers[type];
|
|
393
387
|
}
|
|
394
388
|
|
|
395
|
-
function
|
|
389
|
+
function as(type) {
|
|
390
|
+
return function(parentGfx, element) {
|
|
391
|
+
return renderer(type)(parentGfx, element);
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function renderEventContent(element, parentGfx) {
|
|
396
396
|
|
|
397
397
|
var event = getSemantic(element);
|
|
398
398
|
var isThrowing = isThrowEvent(event);
|
|
399
399
|
|
|
400
400
|
if (event.eventDefinitions && event.eventDefinitions.length>1) {
|
|
401
401
|
if (event.parallelMultiple) {
|
|
402
|
-
return renderer('bpmn:ParallelMultipleEventDefinition')(parentGfx, element,
|
|
402
|
+
return renderer('bpmn:ParallelMultipleEventDefinition')(parentGfx, element, isThrowing);
|
|
403
403
|
}
|
|
404
404
|
else {
|
|
405
|
-
return renderer('bpmn:MultipleEventDefinition')(parentGfx, element,
|
|
405
|
+
return renderer('bpmn:MultipleEventDefinition')(parentGfx, element, isThrowing);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
if (isTypedEvent(event, 'bpmn:MessageEventDefinition')) {
|
|
410
|
-
return renderer('bpmn:MessageEventDefinition')(parentGfx, element,
|
|
410
|
+
return renderer('bpmn:MessageEventDefinition')(parentGfx, element, isThrowing);
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
if (isTypedEvent(event, 'bpmn:TimerEventDefinition')) {
|
|
414
|
-
return renderer('bpmn:TimerEventDefinition')(parentGfx, element,
|
|
414
|
+
return renderer('bpmn:TimerEventDefinition')(parentGfx, element, isThrowing);
|
|
415
415
|
}
|
|
416
416
|
|
|
417
417
|
if (isTypedEvent(event, 'bpmn:ConditionalEventDefinition')) {
|
|
418
|
-
return renderer('bpmn:ConditionalEventDefinition')(parentGfx, element
|
|
418
|
+
return renderer('bpmn:ConditionalEventDefinition')(parentGfx, element);
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
if (isTypedEvent(event, 'bpmn:SignalEventDefinition')) {
|
|
422
|
-
return renderer('bpmn:SignalEventDefinition')(parentGfx, element,
|
|
422
|
+
return renderer('bpmn:SignalEventDefinition')(parentGfx, element, isThrowing);
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
if (isTypedEvent(event, 'bpmn:EscalationEventDefinition')) {
|
|
426
|
-
return renderer('bpmn:EscalationEventDefinition')(parentGfx, element,
|
|
426
|
+
return renderer('bpmn:EscalationEventDefinition')(parentGfx, element, isThrowing);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
if (isTypedEvent(event, 'bpmn:LinkEventDefinition')) {
|
|
430
|
-
return renderer('bpmn:LinkEventDefinition')(parentGfx, element,
|
|
430
|
+
return renderer('bpmn:LinkEventDefinition')(parentGfx, element, isThrowing);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
if (isTypedEvent(event, 'bpmn:ErrorEventDefinition')) {
|
|
434
|
-
return renderer('bpmn:ErrorEventDefinition')(parentGfx, element,
|
|
434
|
+
return renderer('bpmn:ErrorEventDefinition')(parentGfx, element, isThrowing);
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
if (isTypedEvent(event, 'bpmn:CancelEventDefinition')) {
|
|
438
|
-
return renderer('bpmn:CancelEventDefinition')(parentGfx, element,
|
|
438
|
+
return renderer('bpmn:CancelEventDefinition')(parentGfx, element, isThrowing);
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
if (isTypedEvent(event, 'bpmn:CompensateEventDefinition')) {
|
|
442
|
-
return renderer('bpmn:CompensateEventDefinition')(parentGfx, element,
|
|
442
|
+
return renderer('bpmn:CompensateEventDefinition')(parentGfx, element, isThrowing);
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
if (isTypedEvent(event, 'bpmn:TerminateEventDefinition')) {
|
|
446
|
-
return renderer('bpmn:TerminateEventDefinition')(parentGfx, element,
|
|
446
|
+
return renderer('bpmn:TerminateEventDefinition')(parentGfx, element, isThrowing);
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
return null;
|
|
@@ -466,20 +466,20 @@ export default function BpmnRenderer(
|
|
|
466
466
|
return text;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
function renderEmbeddedLabel(parentGfx, element, align
|
|
469
|
+
function renderEmbeddedLabel(parentGfx, element, align) {
|
|
470
470
|
var semantic = getSemantic(element);
|
|
471
471
|
|
|
472
472
|
return renderLabel(parentGfx, semantic.name, {
|
|
473
473
|
box: element,
|
|
474
474
|
align: align,
|
|
475
475
|
padding: 5,
|
|
476
|
-
style:
|
|
476
|
+
style: {
|
|
477
477
|
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
478
|
-
}
|
|
478
|
+
}
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
|
|
482
|
-
function renderExternalLabel(parentGfx, element
|
|
482
|
+
function renderExternalLabel(parentGfx, element) {
|
|
483
483
|
|
|
484
484
|
var box = {
|
|
485
485
|
width: 90,
|
|
@@ -496,22 +496,21 @@ export default function BpmnRenderer(
|
|
|
496
496
|
textRenderer.getExternalStyle(),
|
|
497
497
|
{
|
|
498
498
|
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
499
|
-
}
|
|
500
|
-
attrs
|
|
499
|
+
}
|
|
501
500
|
)
|
|
502
501
|
});
|
|
503
502
|
}
|
|
504
503
|
|
|
505
|
-
function renderLaneLabel(parentGfx, text, element
|
|
504
|
+
function renderLaneLabel(parentGfx, text, element) {
|
|
506
505
|
var textBox = renderLabel(parentGfx, text, {
|
|
507
506
|
box: {
|
|
508
507
|
height: 30,
|
|
509
508
|
width: element.height
|
|
510
509
|
},
|
|
511
510
|
align: 'center-middle',
|
|
512
|
-
style:
|
|
511
|
+
style: {
|
|
513
512
|
fill: getLabelColor(element, defaultLabelColor, defaultStrokeColor)
|
|
514
|
-
}
|
|
513
|
+
}
|
|
515
514
|
});
|
|
516
515
|
|
|
517
516
|
var top = -1 * element.height;
|
|
@@ -538,11 +537,11 @@ export default function BpmnRenderer(
|
|
|
538
537
|
|
|
539
538
|
return drawCircle(parentGfx, element.width, element.height, attrs);
|
|
540
539
|
},
|
|
541
|
-
'bpmn:StartEvent': function(parentGfx, element
|
|
542
|
-
attrs =
|
|
540
|
+
'bpmn:StartEvent': function(parentGfx, element) {
|
|
541
|
+
var attrs = {
|
|
543
542
|
fill: getFillColor(element, defaultFillColor),
|
|
544
543
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
545
|
-
}
|
|
544
|
+
};
|
|
546
545
|
|
|
547
546
|
var semantic = getSemantic(element);
|
|
548
547
|
|
|
@@ -561,7 +560,7 @@ export default function BpmnRenderer(
|
|
|
561
560
|
|
|
562
561
|
return circle;
|
|
563
562
|
},
|
|
564
|
-
'bpmn:MessageEventDefinition': function(parentGfx, element,
|
|
563
|
+
'bpmn:MessageEventDefinition': function(parentGfx, element, isThrowing) {
|
|
565
564
|
var pathData = pathMap.getScaledPath('EVENT_MESSAGE', {
|
|
566
565
|
xScaleFactor: 0.9,
|
|
567
566
|
yScaleFactor: 0.9,
|
|
@@ -576,24 +575,20 @@ export default function BpmnRenderer(
|
|
|
576
575
|
var fill = isThrowing ? getStrokeColor(element, defaultStrokeColor) : getFillColor(element, defaultFillColor);
|
|
577
576
|
var stroke = isThrowing ? getFillColor(element, defaultFillColor) : getStrokeColor(element, defaultStrokeColor);
|
|
578
577
|
|
|
579
|
-
|
|
578
|
+
var messagePath = drawPath(parentGfx, pathData, {
|
|
580
579
|
strokeWidth: 1,
|
|
581
580
|
fill: fill,
|
|
582
581
|
stroke: stroke
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
var messagePath = drawPath(parentGfx, pathData, attrs);
|
|
582
|
+
});
|
|
586
583
|
|
|
587
584
|
return messagePath;
|
|
588
585
|
},
|
|
589
|
-
'bpmn:TimerEventDefinition': function(parentGfx, element
|
|
590
|
-
var
|
|
586
|
+
'bpmn:TimerEventDefinition': function(parentGfx, element) {
|
|
587
|
+
var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, {
|
|
591
588
|
strokeWidth: 2,
|
|
592
589
|
fill: getFillColor(element, defaultFillColor),
|
|
593
590
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
var circle = drawCircle(parentGfx, element.width, element.height, 0.2 * element.height, outerAttrs);
|
|
591
|
+
});
|
|
597
592
|
|
|
598
593
|
var pathData = pathMap.getScaledPath('EVENT_TIMER_WH', {
|
|
599
594
|
xScaleFactor: 0.75,
|
|
@@ -606,13 +601,11 @@ export default function BpmnRenderer(
|
|
|
606
601
|
}
|
|
607
602
|
});
|
|
608
603
|
|
|
609
|
-
|
|
604
|
+
drawPath(parentGfx, pathData, {
|
|
610
605
|
strokeWidth: 2,
|
|
611
606
|
strokeLinecap: 'square',
|
|
612
607
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
drawPath(parentGfx, pathData, innerAttrs);
|
|
608
|
+
});
|
|
616
609
|
|
|
617
610
|
for (var i = 0;i < 12; i++) {
|
|
618
611
|
|
|
@@ -630,25 +623,17 @@ export default function BpmnRenderer(
|
|
|
630
623
|
var width = element.width / 2;
|
|
631
624
|
var height = element.height / 2;
|
|
632
625
|
|
|
633
|
-
|
|
626
|
+
drawPath(parentGfx, linePathData, {
|
|
634
627
|
strokeWidth: 1,
|
|
635
628
|
strokeLinecap: 'square',
|
|
636
629
|
transform: 'rotate(' + (i * 30) + ',' + height + ',' + width + ')',
|
|
637
630
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
drawPath(parentGfx, linePathData, lineAttrs);
|
|
631
|
+
});
|
|
641
632
|
}
|
|
642
633
|
|
|
643
634
|
return circle;
|
|
644
635
|
},
|
|
645
|
-
'bpmn:EscalationEventDefinition': function(parentGfx, event,
|
|
646
|
-
attrs = assign({
|
|
647
|
-
strokeWidth: 1,
|
|
648
|
-
fill: fill,
|
|
649
|
-
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
650
|
-
}, attrs);
|
|
651
|
-
|
|
636
|
+
'bpmn:EscalationEventDefinition': function(parentGfx, event, isThrowing) {
|
|
652
637
|
var pathData = pathMap.getScaledPath('EVENT_ESCALATION', {
|
|
653
638
|
xScaleFactor: 1,
|
|
654
639
|
yScaleFactor: 1,
|
|
@@ -662,14 +647,13 @@ export default function BpmnRenderer(
|
|
|
662
647
|
|
|
663
648
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
664
649
|
|
|
665
|
-
return drawPath(parentGfx, pathData,
|
|
666
|
-
},
|
|
667
|
-
'bpmn:ConditionalEventDefinition': function(parentGfx, event, attrs) {
|
|
668
|
-
attrs = assign({
|
|
650
|
+
return drawPath(parentGfx, pathData, {
|
|
669
651
|
strokeWidth: 1,
|
|
652
|
+
fill: fill,
|
|
670
653
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
671
|
-
}
|
|
672
|
-
|
|
654
|
+
});
|
|
655
|
+
},
|
|
656
|
+
'bpmn:ConditionalEventDefinition': function(parentGfx, event) {
|
|
673
657
|
var pathData = pathMap.getScaledPath('EVENT_CONDITIONAL', {
|
|
674
658
|
xScaleFactor: 1,
|
|
675
659
|
yScaleFactor: 1,
|
|
@@ -681,9 +665,12 @@ export default function BpmnRenderer(
|
|
|
681
665
|
}
|
|
682
666
|
});
|
|
683
667
|
|
|
684
|
-
return drawPath(parentGfx, pathData,
|
|
668
|
+
return drawPath(parentGfx, pathData, {
|
|
669
|
+
strokeWidth: 1,
|
|
670
|
+
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
671
|
+
});
|
|
685
672
|
},
|
|
686
|
-
'bpmn:LinkEventDefinition': function(parentGfx, event,
|
|
673
|
+
'bpmn:LinkEventDefinition': function(parentGfx, event, isThrowing) {
|
|
687
674
|
var pathData = pathMap.getScaledPath('EVENT_LINK', {
|
|
688
675
|
xScaleFactor: 1,
|
|
689
676
|
yScaleFactor: 1,
|
|
@@ -697,15 +684,13 @@ export default function BpmnRenderer(
|
|
|
697
684
|
|
|
698
685
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
699
686
|
|
|
700
|
-
|
|
687
|
+
return drawPath(parentGfx, pathData, {
|
|
701
688
|
strokeWidth: 1,
|
|
702
689
|
fill: fill,
|
|
703
690
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
691
|
+
});
|
|
707
692
|
},
|
|
708
|
-
'bpmn:ErrorEventDefinition': function(parentGfx, event,
|
|
693
|
+
'bpmn:ErrorEventDefinition': function(parentGfx, event, isThrowing) {
|
|
709
694
|
var pathData = pathMap.getScaledPath('EVENT_ERROR', {
|
|
710
695
|
xScaleFactor: 1.1,
|
|
711
696
|
yScaleFactor: 1.1,
|
|
@@ -719,15 +704,13 @@ export default function BpmnRenderer(
|
|
|
719
704
|
|
|
720
705
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
721
706
|
|
|
722
|
-
|
|
707
|
+
return drawPath(parentGfx, pathData, {
|
|
723
708
|
strokeWidth: 1,
|
|
724
709
|
fill: fill,
|
|
725
710
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
711
|
+
});
|
|
729
712
|
},
|
|
730
|
-
'bpmn:CancelEventDefinition': function(parentGfx, event,
|
|
713
|
+
'bpmn:CancelEventDefinition': function(parentGfx, event, isThrowing) {
|
|
731
714
|
var pathData = pathMap.getScaledPath('EVENT_CANCEL_45', {
|
|
732
715
|
xScaleFactor: 1.0,
|
|
733
716
|
yScaleFactor: 1.0,
|
|
@@ -741,19 +724,17 @@ export default function BpmnRenderer(
|
|
|
741
724
|
|
|
742
725
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
743
726
|
|
|
744
|
-
|
|
727
|
+
var path = drawPath(parentGfx, pathData, {
|
|
745
728
|
strokeWidth: 1,
|
|
746
729
|
fill: fill,
|
|
747
730
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
var path = drawPath(parentGfx, pathData, attrs);
|
|
731
|
+
});
|
|
751
732
|
|
|
752
733
|
rotate(path, 45);
|
|
753
734
|
|
|
754
735
|
return path;
|
|
755
736
|
},
|
|
756
|
-
'bpmn:CompensateEventDefinition': function(parentGfx, event,
|
|
737
|
+
'bpmn:CompensateEventDefinition': function(parentGfx, event, isThrowing) {
|
|
757
738
|
var pathData = pathMap.getScaledPath('EVENT_COMPENSATION', {
|
|
758
739
|
xScaleFactor: 1,
|
|
759
740
|
yScaleFactor: 1,
|
|
@@ -767,15 +748,13 @@ export default function BpmnRenderer(
|
|
|
767
748
|
|
|
768
749
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
769
750
|
|
|
770
|
-
|
|
751
|
+
return drawPath(parentGfx, pathData, {
|
|
771
752
|
strokeWidth: 1,
|
|
772
753
|
fill: fill,
|
|
773
754
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
755
|
+
});
|
|
777
756
|
},
|
|
778
|
-
'bpmn:SignalEventDefinition': function(parentGfx, event,
|
|
757
|
+
'bpmn:SignalEventDefinition': function(parentGfx, event, isThrowing) {
|
|
779
758
|
var pathData = pathMap.getScaledPath('EVENT_SIGNAL', {
|
|
780
759
|
xScaleFactor: 0.9,
|
|
781
760
|
yScaleFactor: 0.9,
|
|
@@ -789,15 +768,13 @@ export default function BpmnRenderer(
|
|
|
789
768
|
|
|
790
769
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
791
770
|
|
|
792
|
-
|
|
771
|
+
return drawPath(parentGfx, pathData, {
|
|
793
772
|
strokeWidth: 1,
|
|
794
773
|
fill: fill,
|
|
795
774
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
775
|
+
});
|
|
799
776
|
},
|
|
800
|
-
'bpmn:MultipleEventDefinition': function(parentGfx, event,
|
|
777
|
+
'bpmn:MultipleEventDefinition': function(parentGfx, event, isThrowing) {
|
|
801
778
|
var pathData = pathMap.getScaledPath('EVENT_MULTIPLE', {
|
|
802
779
|
xScaleFactor: 1.1,
|
|
803
780
|
yScaleFactor: 1.1,
|
|
@@ -811,14 +788,12 @@ export default function BpmnRenderer(
|
|
|
811
788
|
|
|
812
789
|
var fill = isThrowing ? getStrokeColor(event, defaultStrokeColor) : 'none';
|
|
813
790
|
|
|
814
|
-
|
|
791
|
+
return drawPath(parentGfx, pathData, {
|
|
815
792
|
strokeWidth: 1,
|
|
816
793
|
fill: fill
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
794
|
+
});
|
|
820
795
|
},
|
|
821
|
-
'bpmn:ParallelMultipleEventDefinition': function(parentGfx, event
|
|
796
|
+
'bpmn:ParallelMultipleEventDefinition': function(parentGfx, event) {
|
|
822
797
|
var pathData = pathMap.getScaledPath('EVENT_PARALLEL_MULTIPLE', {
|
|
823
798
|
xScaleFactor: 1.2,
|
|
824
799
|
yScaleFactor: 1.2,
|
|
@@ -830,54 +805,47 @@ export default function BpmnRenderer(
|
|
|
830
805
|
}
|
|
831
806
|
});
|
|
832
807
|
|
|
833
|
-
|
|
808
|
+
return drawPath(parentGfx, pathData, {
|
|
834
809
|
strokeWidth: 1,
|
|
835
810
|
fill: getStrokeColor(event, defaultStrokeColor),
|
|
836
811
|
stroke: getStrokeColor(event, defaultStrokeColor)
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
return drawPath(parentGfx, pathData, attrs);
|
|
812
|
+
});
|
|
841
813
|
},
|
|
842
|
-
'bpmn:EndEvent': function(parentGfx, element
|
|
843
|
-
var
|
|
814
|
+
'bpmn:EndEvent': function(parentGfx, element) {
|
|
815
|
+
var circle = renderer('bpmn:Event')(parentGfx, element, {
|
|
844
816
|
strokeWidth: 4,
|
|
845
817
|
fill: getFillColor(element, defaultFillColor),
|
|
846
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
var circle = renderer('bpmn:Event')(parentGfx, element, outerAttrs);
|
|
818
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
819
|
+
});
|
|
850
820
|
|
|
851
|
-
renderEventContent(element, parentGfx,
|
|
821
|
+
renderEventContent(element, parentGfx, true);
|
|
852
822
|
|
|
853
823
|
return circle;
|
|
854
824
|
},
|
|
855
|
-
'bpmn:TerminateEventDefinition': function(parentGfx, element
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
var circle = drawCircle(parentGfx, element.width, element.height, 8, attrs);
|
|
825
|
+
'bpmn:TerminateEventDefinition': function(parentGfx, element) {
|
|
826
|
+
var circle = drawCircle(parentGfx, element.width, element.height, 8, {
|
|
827
|
+
strokeWidth: 4,
|
|
828
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
829
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
830
|
+
});
|
|
863
831
|
|
|
864
832
|
return circle;
|
|
865
833
|
},
|
|
866
|
-
'bpmn:IntermediateEvent': function(parentGfx, element
|
|
867
|
-
var
|
|
834
|
+
'bpmn:IntermediateEvent': function(parentGfx, element) {
|
|
835
|
+
var outer = renderer('bpmn:Event')(parentGfx, element, {
|
|
868
836
|
strokeWidth: 1,
|
|
869
837
|
fill: getFillColor(element, defaultFillColor),
|
|
870
838
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
var outer = renderer('bpmn:Event')(parentGfx, element, outerAttrs);
|
|
839
|
+
});
|
|
874
840
|
|
|
875
841
|
/* inner */
|
|
876
|
-
drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST,
|
|
842
|
+
drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, {
|
|
843
|
+
strokeWidth: 1,
|
|
877
844
|
fill: getFillColor(element, 'none'),
|
|
878
|
-
|
|
845
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
846
|
+
});
|
|
879
847
|
|
|
880
|
-
renderEventContent(element, parentGfx
|
|
848
|
+
renderEventContent(element, parentGfx);
|
|
881
849
|
|
|
882
850
|
return outer;
|
|
883
851
|
},
|
|
@@ -895,21 +863,21 @@ export default function BpmnRenderer(
|
|
|
895
863
|
return drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
|
|
896
864
|
},
|
|
897
865
|
|
|
898
|
-
'bpmn:Task': function(parentGfx, element
|
|
899
|
-
attrs =
|
|
866
|
+
'bpmn:Task': function(parentGfx, element) {
|
|
867
|
+
var attrs = {
|
|
900
868
|
fill: getFillColor(element, defaultFillColor),
|
|
901
869
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
902
|
-
}
|
|
870
|
+
};
|
|
903
871
|
|
|
904
872
|
var rect = renderer('bpmn:Activity')(parentGfx, element, attrs);
|
|
905
873
|
|
|
906
874
|
renderEmbeddedLabel(parentGfx, element, 'center-middle');
|
|
907
|
-
attachTaskMarkers(parentGfx, element
|
|
875
|
+
attachTaskMarkers(parentGfx, element);
|
|
908
876
|
|
|
909
877
|
return rect;
|
|
910
878
|
},
|
|
911
|
-
'bpmn:ServiceTask': function(parentGfx, element
|
|
912
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
879
|
+
'bpmn:ServiceTask': function(parentGfx, element) {
|
|
880
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
913
881
|
|
|
914
882
|
var pathDataBG = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
|
|
915
883
|
abspos: {
|
|
@@ -918,12 +886,11 @@ export default function BpmnRenderer(
|
|
|
918
886
|
}
|
|
919
887
|
});
|
|
920
888
|
|
|
921
|
-
|
|
889
|
+
/* service bg */ drawPath(parentGfx, pathDataBG, {
|
|
922
890
|
strokeWidth: 1,
|
|
923
891
|
fill: getFillColor(element, defaultFillColor),
|
|
924
892
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
925
|
-
}
|
|
926
|
-
/* service bg */ drawPath(parentGfx, pathDataBG, serviceAttrs);
|
|
893
|
+
});
|
|
927
894
|
|
|
928
895
|
var fillPathData = pathMap.getScaledPath('TASK_TYPE_SERVICE_FILL', {
|
|
929
896
|
abspos: {
|
|
@@ -932,11 +899,10 @@ export default function BpmnRenderer(
|
|
|
932
899
|
}
|
|
933
900
|
});
|
|
934
901
|
|
|
935
|
-
|
|
902
|
+
/* service fill */ drawPath(parentGfx, fillPathData, {
|
|
936
903
|
strokeWidth: 0,
|
|
937
904
|
fill: getFillColor(element, defaultFillColor)
|
|
938
|
-
}
|
|
939
|
-
/* service fill */ drawPath(parentGfx, fillPathData, fillAttrs);
|
|
905
|
+
});
|
|
940
906
|
|
|
941
907
|
var pathData = pathMap.getScaledPath('TASK_TYPE_SERVICE', {
|
|
942
908
|
abspos: {
|
|
@@ -945,12 +911,16 @@ export default function BpmnRenderer(
|
|
|
945
911
|
}
|
|
946
912
|
});
|
|
947
913
|
|
|
948
|
-
/* service */ drawPath(parentGfx, pathData,
|
|
914
|
+
/* service */ drawPath(parentGfx, pathData, {
|
|
915
|
+
strokeWidth: 1,
|
|
916
|
+
fill: getFillColor(element, defaultFillColor),
|
|
917
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
918
|
+
});
|
|
949
919
|
|
|
950
920
|
return task;
|
|
951
921
|
},
|
|
952
|
-
'bpmn:UserTask': function(parentGfx, element
|
|
953
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
922
|
+
'bpmn:UserTask': function(parentGfx, element) {
|
|
923
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
954
924
|
|
|
955
925
|
var x = 15;
|
|
956
926
|
var y = 12;
|
|
@@ -962,12 +932,11 @@ export default function BpmnRenderer(
|
|
|
962
932
|
}
|
|
963
933
|
});
|
|
964
934
|
|
|
965
|
-
|
|
935
|
+
/* user path */ drawPath(parentGfx, pathData, {
|
|
966
936
|
strokeWidth: 0.5,
|
|
967
937
|
fill: getFillColor(element, defaultFillColor),
|
|
968
938
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
969
|
-
}
|
|
970
|
-
/* user path */ drawPath(parentGfx, pathData, userAttrs);
|
|
939
|
+
});
|
|
971
940
|
|
|
972
941
|
var pathData2 = pathMap.getScaledPath('TASK_TYPE_USER_2', {
|
|
973
942
|
abspos: {
|
|
@@ -976,7 +945,11 @@ export default function BpmnRenderer(
|
|
|
976
945
|
}
|
|
977
946
|
});
|
|
978
947
|
|
|
979
|
-
/* user2 path */ drawPath(parentGfx, pathData2,
|
|
948
|
+
/* user2 path */ drawPath(parentGfx, pathData2, {
|
|
949
|
+
strokeWidth: 0.5,
|
|
950
|
+
fill: getFillColor(element, defaultFillColor),
|
|
951
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
952
|
+
});
|
|
980
953
|
|
|
981
954
|
var pathData3 = pathMap.getScaledPath('TASK_TYPE_USER_3', {
|
|
982
955
|
abspos: {
|
|
@@ -985,12 +958,16 @@ export default function BpmnRenderer(
|
|
|
985
958
|
}
|
|
986
959
|
});
|
|
987
960
|
|
|
988
|
-
/* user3 path */ drawPath(parentGfx, pathData3,
|
|
961
|
+
/* user3 path */ drawPath(parentGfx, pathData3, {
|
|
962
|
+
strokeWidth: 0.5,
|
|
963
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
964
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
965
|
+
});
|
|
989
966
|
|
|
990
967
|
return task;
|
|
991
968
|
},
|
|
992
|
-
'bpmn:ManualTask': function(parentGfx, element
|
|
993
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
969
|
+
'bpmn:ManualTask': function(parentGfx, element) {
|
|
970
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
994
971
|
|
|
995
972
|
var pathData = pathMap.getScaledPath('TASK_TYPE_MANUAL', {
|
|
996
973
|
abspos: {
|
|
@@ -999,17 +976,16 @@ export default function BpmnRenderer(
|
|
|
999
976
|
}
|
|
1000
977
|
});
|
|
1001
978
|
|
|
1002
|
-
|
|
979
|
+
/* manual path */ drawPath(parentGfx, pathData, {
|
|
1003
980
|
strokeWidth: 0.5, // 0.25,
|
|
1004
981
|
fill: getFillColor(element, defaultFillColor),
|
|
1005
982
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1006
|
-
}
|
|
1007
|
-
/* manual path */ drawPath(parentGfx, pathData, manualAttrs);
|
|
983
|
+
});
|
|
1008
984
|
|
|
1009
985
|
return task;
|
|
1010
986
|
},
|
|
1011
|
-
'bpmn:SendTask': function(parentGfx, element
|
|
1012
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
987
|
+
'bpmn:SendTask': function(parentGfx, element) {
|
|
988
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
1013
989
|
|
|
1014
990
|
var pathData = pathMap.getScaledPath('TASK_TYPE_SEND', {
|
|
1015
991
|
xScaleFactor: 1,
|
|
@@ -1022,25 +998,22 @@ export default function BpmnRenderer(
|
|
|
1022
998
|
}
|
|
1023
999
|
});
|
|
1024
1000
|
|
|
1025
|
-
/* send path */
|
|
1026
|
-
var pathAttrs = assign({
|
|
1001
|
+
/* send path */ drawPath(parentGfx, pathData, {
|
|
1027
1002
|
strokeWidth: 1,
|
|
1028
1003
|
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1029
1004
|
stroke: getFillColor(element, defaultFillColor)
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
drawPath(parentGfx, pathData, pathAttrs);
|
|
1005
|
+
});
|
|
1033
1006
|
|
|
1034
1007
|
return task;
|
|
1035
1008
|
},
|
|
1036
|
-
'bpmn:ReceiveTask' : function(parentGfx, element
|
|
1009
|
+
'bpmn:ReceiveTask' : function(parentGfx, element) {
|
|
1037
1010
|
var semantic = getSemantic(element);
|
|
1038
1011
|
|
|
1039
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
1012
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
1040
1013
|
var pathData;
|
|
1041
1014
|
|
|
1042
1015
|
if (semantic.instantiate) {
|
|
1043
|
-
drawCircle(parentGfx, 28, 28, 20 * 0.22,
|
|
1016
|
+
drawCircle(parentGfx, 28, 28, 20 * 0.22, { strokeWidth: 1 });
|
|
1044
1017
|
|
|
1045
1018
|
pathData = pathMap.getScaledPath('TASK_TYPE_INSTANTIATING_SEND', {
|
|
1046
1019
|
abspos: {
|
|
@@ -1062,18 +1035,16 @@ export default function BpmnRenderer(
|
|
|
1062
1035
|
});
|
|
1063
1036
|
}
|
|
1064
1037
|
|
|
1065
|
-
|
|
1038
|
+
/* receive path */ drawPath(parentGfx, pathData, {
|
|
1066
1039
|
strokeWidth: 1,
|
|
1067
1040
|
fill: getFillColor(element, defaultFillColor),
|
|
1068
1041
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
/* receive path */ drawPath(parentGfx, pathData, receiveAttrs);
|
|
1042
|
+
});
|
|
1072
1043
|
|
|
1073
1044
|
return task;
|
|
1074
1045
|
},
|
|
1075
|
-
'bpmn:ScriptTask': function(parentGfx, element
|
|
1076
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
1046
|
+
'bpmn:ScriptTask': function(parentGfx, element) {
|
|
1047
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
1077
1048
|
|
|
1078
1049
|
var pathData = pathMap.getScaledPath('TASK_TYPE_SCRIPT', {
|
|
1079
1050
|
abspos: {
|
|
@@ -1082,16 +1053,15 @@ export default function BpmnRenderer(
|
|
|
1082
1053
|
}
|
|
1083
1054
|
});
|
|
1084
1055
|
|
|
1085
|
-
|
|
1056
|
+
/* script path */ drawPath(parentGfx, pathData, {
|
|
1086
1057
|
strokeWidth: 1,
|
|
1087
1058
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1088
|
-
}
|
|
1089
|
-
/* script path */ drawPath(parentGfx, pathData, scriptAttrs);
|
|
1059
|
+
});
|
|
1090
1060
|
|
|
1091
1061
|
return task;
|
|
1092
1062
|
},
|
|
1093
|
-
'bpmn:BusinessRuleTask': function(parentGfx, element
|
|
1094
|
-
var task = renderer('bpmn:Task')(parentGfx, element
|
|
1063
|
+
'bpmn:BusinessRuleTask': function(parentGfx, element) {
|
|
1064
|
+
var task = renderer('bpmn:Task')(parentGfx, element);
|
|
1095
1065
|
|
|
1096
1066
|
var headerPathData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_HEADER', {
|
|
1097
1067
|
abspos: {
|
|
@@ -1100,12 +1070,12 @@ export default function BpmnRenderer(
|
|
|
1100
1070
|
}
|
|
1101
1071
|
});
|
|
1102
1072
|
|
|
1103
|
-
var
|
|
1073
|
+
var businessHeaderPath = drawPath(parentGfx, headerPathData);
|
|
1074
|
+
svgAttr(businessHeaderPath, {
|
|
1104
1075
|
strokeWidth: 1,
|
|
1105
1076
|
fill: getFillColor(element, '#aaaaaa'),
|
|
1106
1077
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1107
|
-
}
|
|
1108
|
-
drawPath(parentGfx, headerPathData, headerAttrs);
|
|
1078
|
+
});
|
|
1109
1079
|
|
|
1110
1080
|
var headerData = pathMap.getScaledPath('TASK_TYPE_BUSINESS_RULE_MAIN', {
|
|
1111
1081
|
abspos: {
|
|
@@ -1114,11 +1084,11 @@ export default function BpmnRenderer(
|
|
|
1114
1084
|
}
|
|
1115
1085
|
});
|
|
1116
1086
|
|
|
1117
|
-
var
|
|
1087
|
+
var businessPath = drawPath(parentGfx, headerData);
|
|
1088
|
+
svgAttr(businessPath, {
|
|
1118
1089
|
strokeWidth: 1,
|
|
1119
1090
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1120
|
-
}
|
|
1121
|
-
drawPath(parentGfx, headerData, businessAttrs);
|
|
1091
|
+
});
|
|
1122
1092
|
|
|
1123
1093
|
return task;
|
|
1124
1094
|
},
|
|
@@ -1141,42 +1111,41 @@ export default function BpmnRenderer(
|
|
|
1141
1111
|
renderEmbeddedLabel(parentGfx, element, expanded ? 'center-top' : 'center-middle');
|
|
1142
1112
|
|
|
1143
1113
|
if (expanded) {
|
|
1144
|
-
attachTaskMarkers(parentGfx, element
|
|
1114
|
+
attachTaskMarkers(parentGfx, element);
|
|
1145
1115
|
} else {
|
|
1146
|
-
attachTaskMarkers(parentGfx, element,
|
|
1116
|
+
attachTaskMarkers(parentGfx, element, ['SubProcessMarker']);
|
|
1147
1117
|
}
|
|
1148
1118
|
|
|
1149
1119
|
return rect;
|
|
1150
1120
|
},
|
|
1151
|
-
'bpmn:AdHocSubProcess': function(parentGfx, element
|
|
1152
|
-
return renderer('bpmn:SubProcess')(parentGfx, element
|
|
1121
|
+
'bpmn:AdHocSubProcess': function(parentGfx, element) {
|
|
1122
|
+
return renderer('bpmn:SubProcess')(parentGfx, element);
|
|
1153
1123
|
},
|
|
1154
|
-
'bpmn:Transaction': function(parentGfx, element
|
|
1155
|
-
var outer = renderer('bpmn:SubProcess')(parentGfx, element
|
|
1124
|
+
'bpmn:Transaction': function(parentGfx, element) {
|
|
1125
|
+
var outer = renderer('bpmn:SubProcess')(parentGfx, element);
|
|
1156
1126
|
|
|
1157
1127
|
var innerAttrs = styles.style([ 'no-fill', 'no-events' ], {
|
|
1158
1128
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1159
1129
|
});
|
|
1160
1130
|
|
|
1161
|
-
/* inner path */ drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST,
|
|
1131
|
+
/* inner path */ drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS - 2, INNER_OUTER_DIST, innerAttrs);
|
|
1162
1132
|
|
|
1163
1133
|
return outer;
|
|
1164
1134
|
},
|
|
1165
|
-
'bpmn:CallActivity': function(parentGfx, element
|
|
1166
|
-
|
|
1135
|
+
'bpmn:CallActivity': function(parentGfx, element) {
|
|
1136
|
+
return renderer('bpmn:SubProcess')(parentGfx, element, {
|
|
1167
1137
|
strokeWidth: 5
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
return renderer('bpmn:SubProcess')(parentGfx, element, attrs);
|
|
1138
|
+
});
|
|
1171
1139
|
},
|
|
1172
|
-
'bpmn:Participant': function(parentGfx, element
|
|
1173
|
-
|
|
1140
|
+
'bpmn:Participant': function(parentGfx, element) {
|
|
1141
|
+
|
|
1142
|
+
var attrs = {
|
|
1174
1143
|
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1175
1144
|
fill: getFillColor(element, defaultFillColor),
|
|
1176
1145
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1177
|
-
}
|
|
1146
|
+
};
|
|
1178
1147
|
|
|
1179
|
-
var lane = renderer('bpmn:Lane')(parentGfx, element,
|
|
1148
|
+
var lane = renderer('bpmn:Lane')(parentGfx, element, attrs);
|
|
1180
1149
|
|
|
1181
1150
|
var expandedPool = isExpanded(element);
|
|
1182
1151
|
|
|
@@ -1184,9 +1153,9 @@ export default function BpmnRenderer(
|
|
|
1184
1153
|
drawLine(parentGfx, [
|
|
1185
1154
|
{ x: 30, y: 0 },
|
|
1186
1155
|
{ x: 30, y: element.height }
|
|
1187
|
-
],
|
|
1156
|
+
], {
|
|
1188
1157
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1189
|
-
}
|
|
1158
|
+
});
|
|
1190
1159
|
var text = getSemantic(element).name;
|
|
1191
1160
|
renderLaneLabel(parentGfx, text, element);
|
|
1192
1161
|
} else {
|
|
@@ -1204,7 +1173,7 @@ export default function BpmnRenderer(
|
|
|
1204
1173
|
var participantMultiplicity = !!(getSemantic(element).participantMultiplicity);
|
|
1205
1174
|
|
|
1206
1175
|
if (participantMultiplicity) {
|
|
1207
|
-
renderer('ParticipantMultiplicityMarker')(parentGfx, element
|
|
1176
|
+
renderer('ParticipantMultiplicityMarker')(parentGfx, element);
|
|
1208
1177
|
}
|
|
1209
1178
|
|
|
1210
1179
|
return lane;
|
|
@@ -1225,23 +1194,20 @@ export default function BpmnRenderer(
|
|
|
1225
1194
|
|
|
1226
1195
|
return rect;
|
|
1227
1196
|
},
|
|
1228
|
-
'bpmn:InclusiveGateway': function(parentGfx, element
|
|
1229
|
-
var diamond = renderer('bpmn:Gateway')(parentGfx, element
|
|
1230
|
-
|
|
1197
|
+
'bpmn:InclusiveGateway': function(parentGfx, element) {
|
|
1198
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1231
1199
|
|
|
1232
|
-
|
|
1200
|
+
/* circle path */
|
|
1201
|
+
drawCircle(parentGfx, element.width, element.height, element.height * 0.24, {
|
|
1233
1202
|
strokeWidth: 2.5,
|
|
1234
1203
|
fill: getFillColor(element, defaultFillColor),
|
|
1235
1204
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/* circle path */
|
|
1239
|
-
drawCircle(parentGfx, element.width, element.height, element.height * 0.24, circleAttrs);
|
|
1205
|
+
});
|
|
1240
1206
|
|
|
1241
1207
|
return diamond;
|
|
1242
1208
|
},
|
|
1243
|
-
'bpmn:ExclusiveGateway': function(parentGfx, element
|
|
1244
|
-
var diamond = renderer('bpmn:Gateway')(parentGfx, element
|
|
1209
|
+
'bpmn:ExclusiveGateway': function(parentGfx, element) {
|
|
1210
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1245
1211
|
|
|
1246
1212
|
var pathData = pathMap.getScaledPath('GATEWAY_EXCLUSIVE', {
|
|
1247
1213
|
xScaleFactor: 0.4,
|
|
@@ -1255,17 +1221,17 @@ export default function BpmnRenderer(
|
|
|
1255
1221
|
});
|
|
1256
1222
|
|
|
1257
1223
|
if ((getDi(element).isMarkerVisible)) {
|
|
1258
|
-
drawPath(parentGfx, pathData,
|
|
1224
|
+
drawPath(parentGfx, pathData, {
|
|
1259
1225
|
strokeWidth: 1,
|
|
1260
1226
|
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1261
1227
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1262
|
-
}
|
|
1228
|
+
});
|
|
1263
1229
|
}
|
|
1264
1230
|
|
|
1265
1231
|
return diamond;
|
|
1266
1232
|
},
|
|
1267
|
-
'bpmn:ComplexGateway': function(parentGfx, element
|
|
1268
|
-
var diamond = renderer('bpmn:Gateway')(parentGfx, element
|
|
1233
|
+
'bpmn:ComplexGateway': function(parentGfx, element) {
|
|
1234
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1269
1235
|
|
|
1270
1236
|
var pathData = pathMap.getScaledPath('GATEWAY_COMPLEX', {
|
|
1271
1237
|
xScaleFactor: 0.5,
|
|
@@ -1278,17 +1244,16 @@ export default function BpmnRenderer(
|
|
|
1278
1244
|
}
|
|
1279
1245
|
});
|
|
1280
1246
|
|
|
1281
|
-
|
|
1247
|
+
/* complex path */ drawPath(parentGfx, pathData, {
|
|
1282
1248
|
strokeWidth: 1,
|
|
1283
1249
|
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1284
1250
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1285
|
-
}
|
|
1286
|
-
/* complex path */ drawPath(parentGfx, pathData, innerAttrs);
|
|
1251
|
+
});
|
|
1287
1252
|
|
|
1288
1253
|
return diamond;
|
|
1289
1254
|
},
|
|
1290
|
-
'bpmn:ParallelGateway': function(parentGfx, element
|
|
1291
|
-
var diamond = renderer('bpmn:Gateway')(parentGfx, element
|
|
1255
|
+
'bpmn:ParallelGateway': function(parentGfx, element) {
|
|
1256
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1292
1257
|
|
|
1293
1258
|
var pathData = pathMap.getScaledPath('GATEWAY_PARALLEL', {
|
|
1294
1259
|
xScaleFactor: 0.6,
|
|
@@ -1301,27 +1266,25 @@ export default function BpmnRenderer(
|
|
|
1301
1266
|
}
|
|
1302
1267
|
});
|
|
1303
1268
|
|
|
1304
|
-
|
|
1269
|
+
/* parallel path */ drawPath(parentGfx, pathData, {
|
|
1305
1270
|
strokeWidth: 1,
|
|
1306
1271
|
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1307
1272
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1308
|
-
}
|
|
1309
|
-
/* parallel path */ drawPath(parentGfx, pathData, innerAttrs);
|
|
1273
|
+
});
|
|
1310
1274
|
|
|
1311
1275
|
return diamond;
|
|
1312
1276
|
},
|
|
1313
|
-
'bpmn:EventBasedGateway': function(parentGfx, element
|
|
1277
|
+
'bpmn:EventBasedGateway': function(parentGfx, element) {
|
|
1314
1278
|
|
|
1315
1279
|
var semantic = getSemantic(element);
|
|
1316
1280
|
|
|
1317
|
-
var diamond = renderer('bpmn:Gateway')(parentGfx, element
|
|
1281
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1318
1282
|
|
|
1319
|
-
|
|
1283
|
+
/* outer circle path */ drawCircle(parentGfx, element.width, element.height, element.height * 0.20, {
|
|
1320
1284
|
strokeWidth: 1,
|
|
1321
1285
|
fill: 'none',
|
|
1322
1286
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1323
|
-
}
|
|
1324
|
-
/* outer circle path */ drawCircle(parentGfx, element.width, element.height, element.height * 0.20, outerAttrs);
|
|
1287
|
+
});
|
|
1325
1288
|
|
|
1326
1289
|
var type = semantic.eventGatewayType;
|
|
1327
1290
|
var instantiate = !!semantic.instantiate;
|
|
@@ -1339,12 +1302,13 @@ export default function BpmnRenderer(
|
|
|
1339
1302
|
}
|
|
1340
1303
|
});
|
|
1341
1304
|
|
|
1342
|
-
var
|
|
1305
|
+
var attrs = {
|
|
1343
1306
|
strokeWidth: 2,
|
|
1344
1307
|
fill: getFillColor(element, 'none'),
|
|
1345
1308
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
/* event path */ drawPath(parentGfx, pathData, attrs);
|
|
1348
1312
|
}
|
|
1349
1313
|
|
|
1350
1314
|
if (type === 'Parallel') {
|
|
@@ -1360,7 +1324,7 @@ export default function BpmnRenderer(
|
|
|
1360
1324
|
}
|
|
1361
1325
|
});
|
|
1362
1326
|
|
|
1363
|
-
var parallelPath = drawPath(parentGfx, pathData
|
|
1327
|
+
var parallelPath = drawPath(parentGfx, pathData);
|
|
1364
1328
|
svgAttr(parallelPath, {
|
|
1365
1329
|
strokeWidth: 1,
|
|
1366
1330
|
fill: 'none'
|
|
@@ -1368,12 +1332,12 @@ export default function BpmnRenderer(
|
|
|
1368
1332
|
} else if (type === 'Exclusive') {
|
|
1369
1333
|
|
|
1370
1334
|
if (!instantiate) {
|
|
1371
|
-
var
|
|
1335
|
+
var innerCircle = drawCircle(parentGfx, element.width, element.height, element.height * 0.26);
|
|
1336
|
+
svgAttr(innerCircle, {
|
|
1372
1337
|
strokeWidth: 1,
|
|
1373
1338
|
fill: 'none',
|
|
1374
1339
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1375
|
-
}
|
|
1376
|
-
drawCircle(parentGfx, element.width, element.height, element.height * 0.26, innerCircleAttrs);
|
|
1340
|
+
});
|
|
1377
1341
|
}
|
|
1378
1342
|
|
|
1379
1343
|
drawEvent();
|
|
@@ -1382,28 +1346,26 @@ export default function BpmnRenderer(
|
|
|
1382
1346
|
|
|
1383
1347
|
return diamond;
|
|
1384
1348
|
},
|
|
1385
|
-
'bpmn:Gateway': function(parentGfx, element
|
|
1386
|
-
attrs =
|
|
1349
|
+
'bpmn:Gateway': function(parentGfx, element) {
|
|
1350
|
+
var attrs = {
|
|
1387
1351
|
fill: getFillColor(element, defaultFillColor),
|
|
1388
1352
|
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1389
1353
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1390
|
-
}
|
|
1354
|
+
};
|
|
1391
1355
|
|
|
1392
1356
|
return drawDiamond(parentGfx, element.width, element.height, attrs);
|
|
1393
1357
|
},
|
|
1394
|
-
'bpmn:SequenceFlow': function(parentGfx, element
|
|
1395
|
-
attrs = attrs || {};
|
|
1396
|
-
|
|
1358
|
+
'bpmn:SequenceFlow': function(parentGfx, element) {
|
|
1397
1359
|
var pathData = createPathFromConnection(element);
|
|
1398
1360
|
|
|
1399
|
-
var fill =
|
|
1400
|
-
stroke =
|
|
1361
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1362
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1401
1363
|
|
|
1402
|
-
attrs =
|
|
1364
|
+
var attrs = {
|
|
1403
1365
|
strokeLinejoin: 'round',
|
|
1404
1366
|
markerEnd: marker('sequenceflow-end', fill, stroke),
|
|
1405
1367
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1406
|
-
}
|
|
1368
|
+
};
|
|
1407
1369
|
|
|
1408
1370
|
var path = drawPath(parentGfx, pathData, attrs);
|
|
1409
1371
|
|
|
@@ -1457,56 +1419,41 @@ export default function BpmnRenderer(
|
|
|
1457
1419
|
|
|
1458
1420
|
return drawLine(parentGfx, element.waypoints, attrs);
|
|
1459
1421
|
},
|
|
1460
|
-
'bpmn:DataInputAssociation': function(parentGfx, element
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
var fill = attrs.fill || getFillColor(element, defaultFillColor),
|
|
1464
|
-
stroke = attrs.stroke || getStrokeColor(element, defaultStrokeColor);
|
|
1422
|
+
'bpmn:DataInputAssociation': function(parentGfx, element) {
|
|
1423
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1424
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1465
1425
|
|
|
1466
|
-
|
|
1467
|
-
fill: fill,
|
|
1468
|
-
stroke: stroke,
|
|
1426
|
+
return renderer('bpmn:Association')(parentGfx, element, {
|
|
1469
1427
|
markerEnd: marker('association-end', fill, stroke)
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
return renderer('bpmn:Association')(parentGfx, element, attrs);
|
|
1428
|
+
});
|
|
1473
1429
|
},
|
|
1474
|
-
'bpmn:DataOutputAssociation': function(parentGfx, element
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
var fill = attrs.fill || getFillColor(element, defaultFillColor),
|
|
1478
|
-
stroke = attrs.stroke || getStrokeColor(element, defaultStrokeColor);
|
|
1479
|
-
|
|
1430
|
+
'bpmn:DataOutputAssociation': function(parentGfx, element) {
|
|
1431
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1432
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1480
1433
|
|
|
1481
|
-
|
|
1482
|
-
fill: fill,
|
|
1483
|
-
stroke: stroke,
|
|
1434
|
+
return renderer('bpmn:Association')(parentGfx, element, {
|
|
1484
1435
|
markerEnd: marker('association-end', fill, stroke)
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
return renderer('bpmn:Association')(parentGfx, element, attrs);
|
|
1436
|
+
});
|
|
1488
1437
|
},
|
|
1489
|
-
'bpmn:MessageFlow': function(parentGfx, element
|
|
1490
|
-
attrs = attrs || {};
|
|
1438
|
+
'bpmn:MessageFlow': function(parentGfx, element) {
|
|
1491
1439
|
|
|
1492
1440
|
var semantic = getSemantic(element),
|
|
1493
1441
|
di = getDi(element);
|
|
1494
1442
|
|
|
1495
|
-
var fill =
|
|
1496
|
-
stroke =
|
|
1443
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1444
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1497
1445
|
|
|
1498
1446
|
var pathData = createPathFromConnection(element);
|
|
1499
1447
|
|
|
1500
|
-
|
|
1501
|
-
attrs = assign({
|
|
1448
|
+
var attrs = {
|
|
1502
1449
|
markerEnd: marker('messageflow-end', fill, stroke),
|
|
1503
1450
|
markerStart: marker('messageflow-start', fill, stroke),
|
|
1504
1451
|
strokeDasharray: '10, 12',
|
|
1505
1452
|
strokeLinecap: 'round',
|
|
1506
1453
|
strokeLinejoin: 'round',
|
|
1507
1454
|
strokeWidth: '1.5px',
|
|
1508
|
-
stroke:
|
|
1509
|
-
}
|
|
1455
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1456
|
+
};
|
|
1510
1457
|
|
|
1511
1458
|
var path = drawPath(parentGfx, pathData, attrs);
|
|
1512
1459
|
|
|
@@ -1553,7 +1500,7 @@ export default function BpmnRenderer(
|
|
|
1553
1500
|
|
|
1554
1501
|
return path;
|
|
1555
1502
|
},
|
|
1556
|
-
'bpmn:DataObject': function(parentGfx, element
|
|
1503
|
+
'bpmn:DataObject': function(parentGfx, element) {
|
|
1557
1504
|
var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', {
|
|
1558
1505
|
xScaleFactor: 1,
|
|
1559
1506
|
yScaleFactor: 1,
|
|
@@ -1565,56 +1512,46 @@ export default function BpmnRenderer(
|
|
|
1565
1512
|
}
|
|
1566
1513
|
});
|
|
1567
1514
|
|
|
1568
|
-
var
|
|
1515
|
+
var elementObject = drawPath(parentGfx, pathData, {
|
|
1569
1516
|
fill: getFillColor(element, defaultFillColor),
|
|
1570
1517
|
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1571
1518
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1572
|
-
}
|
|
1573
|
-
var elementObject = drawPath(parentGfx, pathData, outerAttrs);
|
|
1519
|
+
});
|
|
1574
1520
|
|
|
1575
1521
|
var semantic = getSemantic(element);
|
|
1576
1522
|
|
|
1577
1523
|
if (isCollection(semantic)) {
|
|
1578
|
-
renderDataItemCollection(parentGfx, element
|
|
1524
|
+
renderDataItemCollection(parentGfx, element);
|
|
1579
1525
|
}
|
|
1580
1526
|
|
|
1581
1527
|
return elementObject;
|
|
1582
1528
|
},
|
|
1583
1529
|
'bpmn:DataObjectReference': as('bpmn:DataObject'),
|
|
1584
|
-
'bpmn:DataInput': function(parentGfx, element
|
|
1530
|
+
'bpmn:DataInput': function(parentGfx, element) {
|
|
1585
1531
|
|
|
1586
1532
|
var arrowPathData = pathMap.getRawPath('DATA_ARROW');
|
|
1587
1533
|
|
|
1588
1534
|
// page
|
|
1589
|
-
var elementObject = renderer('bpmn:DataObject')(parentGfx, element
|
|
1535
|
+
var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
|
|
1590
1536
|
|
|
1591
|
-
|
|
1592
|
-
/* input arrow path */ drawPath(parentGfx, arrowPathData, innerAttrs);
|
|
1537
|
+
/* input arrow path */ drawPath(parentGfx, arrowPathData, { strokeWidth: 1 });
|
|
1593
1538
|
|
|
1594
1539
|
return elementObject;
|
|
1595
1540
|
},
|
|
1596
|
-
'bpmn:DataOutput': function(parentGfx, element
|
|
1541
|
+
'bpmn:DataOutput': function(parentGfx, element) {
|
|
1597
1542
|
var arrowPathData = pathMap.getRawPath('DATA_ARROW');
|
|
1598
1543
|
|
|
1599
1544
|
// page
|
|
1600
|
-
var elementObject = renderer('bpmn:DataObject')(parentGfx, element
|
|
1545
|
+
var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
|
|
1601
1546
|
|
|
1602
|
-
|
|
1547
|
+
/* output arrow path */ drawPath(parentGfx, arrowPathData, {
|
|
1603
1548
|
strokeWidth: 1,
|
|
1604
1549
|
fill: 'black'
|
|
1605
|
-
}
|
|
1606
|
-
/* output arrow path */ drawPath(parentGfx, arrowPathData, arrowAttrs);
|
|
1550
|
+
});
|
|
1607
1551
|
|
|
1608
1552
|
return elementObject;
|
|
1609
1553
|
},
|
|
1610
|
-
'bpmn:DataStoreReference': function(parentGfx, element
|
|
1611
|
-
attrs = assign({
|
|
1612
|
-
strokeWidth: 2,
|
|
1613
|
-
fill: getFillColor(element, defaultFillColor),
|
|
1614
|
-
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1615
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1616
|
-
}, attrs);
|
|
1617
|
-
|
|
1554
|
+
'bpmn:DataStoreReference': function(parentGfx, element) {
|
|
1618
1555
|
var DATA_STORE_PATH = pathMap.getScaledPath('DATA_STORE', {
|
|
1619
1556
|
xScaleFactor: 1,
|
|
1620
1557
|
yScaleFactor: 1,
|
|
@@ -1626,20 +1563,25 @@ export default function BpmnRenderer(
|
|
|
1626
1563
|
}
|
|
1627
1564
|
});
|
|
1628
1565
|
|
|
1629
|
-
var elementStore = drawPath(parentGfx, DATA_STORE_PATH,
|
|
1566
|
+
var elementStore = drawPath(parentGfx, DATA_STORE_PATH, {
|
|
1567
|
+
strokeWidth: 2,
|
|
1568
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1569
|
+
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1570
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1571
|
+
});
|
|
1630
1572
|
|
|
1631
1573
|
return elementStore;
|
|
1632
1574
|
},
|
|
1633
|
-
'bpmn:BoundaryEvent': function(parentGfx, element
|
|
1575
|
+
'bpmn:BoundaryEvent': function(parentGfx, element) {
|
|
1634
1576
|
|
|
1635
1577
|
var semantic = getSemantic(element),
|
|
1636
1578
|
cancel = semantic.cancelActivity;
|
|
1637
1579
|
|
|
1638
|
-
attrs =
|
|
1580
|
+
var attrs = {
|
|
1639
1581
|
strokeWidth: 1,
|
|
1640
1582
|
fill: getFillColor(element, defaultFillColor),
|
|
1641
1583
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1642
|
-
}
|
|
1584
|
+
};
|
|
1643
1585
|
|
|
1644
1586
|
if (!cancel) {
|
|
1645
1587
|
attrs.strokeDasharray = '6';
|
|
@@ -1660,32 +1602,30 @@ export default function BpmnRenderer(
|
|
|
1660
1602
|
|
|
1661
1603
|
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
|
1662
1604
|
|
|
1663
|
-
renderEventContent(element, parentGfx
|
|
1605
|
+
renderEventContent(element, parentGfx);
|
|
1664
1606
|
|
|
1665
1607
|
return outer;
|
|
1666
1608
|
},
|
|
1667
|
-
'bpmn:Group': function(parentGfx, element
|
|
1609
|
+
'bpmn:Group': function(parentGfx, element) {
|
|
1668
1610
|
|
|
1669
|
-
|
|
1611
|
+
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
|
|
1670
1612
|
stroke: getStrokeColor(element, defaultStrokeColor),
|
|
1671
1613
|
strokeWidth: 1,
|
|
1672
1614
|
strokeDasharray: '8,3,1,3',
|
|
1673
1615
|
fill: 'none',
|
|
1674
1616
|
pointerEvents: 'none'
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
|
-
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
|
|
1617
|
+
});
|
|
1678
1618
|
|
|
1679
1619
|
return group;
|
|
1680
1620
|
},
|
|
1681
1621
|
'label': function(parentGfx, element) {
|
|
1682
1622
|
return renderExternalLabel(parentGfx, element);
|
|
1683
1623
|
},
|
|
1684
|
-
'bpmn:TextAnnotation': function(parentGfx, element
|
|
1685
|
-
var style =
|
|
1624
|
+
'bpmn:TextAnnotation': function(parentGfx, element) {
|
|
1625
|
+
var style = {
|
|
1686
1626
|
'fill': 'none',
|
|
1687
1627
|
'stroke': 'none'
|
|
1688
|
-
}
|
|
1628
|
+
};
|
|
1689
1629
|
|
|
1690
1630
|
var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style);
|
|
1691
1631
|
|
|
@@ -1700,10 +1640,9 @@ export default function BpmnRenderer(
|
|
|
1700
1640
|
}
|
|
1701
1641
|
});
|
|
1702
1642
|
|
|
1703
|
-
|
|
1643
|
+
drawPath(parentGfx, textPathData, {
|
|
1704
1644
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1705
|
-
}
|
|
1706
|
-
drawPath(parentGfx, textPathData, pathAttrs);
|
|
1645
|
+
});
|
|
1707
1646
|
|
|
1708
1647
|
var text = getSemantic(element).text || '';
|
|
1709
1648
|
renderLabel(parentGfx, text, {
|
|
@@ -1717,13 +1656,7 @@ export default function BpmnRenderer(
|
|
|
1717
1656
|
|
|
1718
1657
|
return textElement;
|
|
1719
1658
|
},
|
|
1720
|
-
'ParticipantMultiplicityMarker': function(parentGfx, element
|
|
1721
|
-
attrs = assign({
|
|
1722
|
-
strokeWidth: 2,
|
|
1723
|
-
fill: getFillColor(element, defaultFillColor),
|
|
1724
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1725
|
-
}, attrs);
|
|
1726
|
-
|
|
1659
|
+
'ParticipantMultiplicityMarker': function(parentGfx, element) {
|
|
1727
1660
|
var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
|
|
1728
1661
|
xScaleFactor: 1,
|
|
1729
1662
|
yScaleFactor: 1,
|
|
@@ -1735,15 +1668,18 @@ export default function BpmnRenderer(
|
|
|
1735
1668
|
}
|
|
1736
1669
|
});
|
|
1737
1670
|
|
|
1738
|
-
drawMarker('participant-multiplicity', parentGfx, markerPath,
|
|
1671
|
+
drawMarker('participant-multiplicity', parentGfx, markerPath, {
|
|
1672
|
+
strokeWidth: 2,
|
|
1673
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1674
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1675
|
+
});
|
|
1739
1676
|
},
|
|
1740
|
-
'SubProcessMarker': function(parentGfx, element
|
|
1741
|
-
|
|
1677
|
+
'SubProcessMarker': function(parentGfx, element) {
|
|
1678
|
+
var markerRect = drawRect(parentGfx, 14, 14, 0, {
|
|
1679
|
+
strokeWidth: 1,
|
|
1742
1680
|
fill: getFillColor(element, defaultFillColor),
|
|
1743
1681
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
var markerRect = drawRect(parentGfx, 14, 14, 0, assign({ strokeWidth: 1 }, attrs));
|
|
1682
|
+
});
|
|
1747
1683
|
|
|
1748
1684
|
// Process marker is placed in the middle of the box
|
|
1749
1685
|
// therefore fixed values can be used here
|
|
@@ -1760,14 +1696,12 @@ export default function BpmnRenderer(
|
|
|
1760
1696
|
}
|
|
1761
1697
|
});
|
|
1762
1698
|
|
|
1763
|
-
drawMarker('sub-process', parentGfx, markerPath,
|
|
1764
|
-
},
|
|
1765
|
-
'ParallelMarker': function(parentGfx, element, attrs, position) {
|
|
1766
|
-
attrs = assign({
|
|
1699
|
+
drawMarker('sub-process', parentGfx, markerPath, {
|
|
1767
1700
|
fill: getFillColor(element, defaultFillColor),
|
|
1768
1701
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1702
|
+
});
|
|
1703
|
+
},
|
|
1704
|
+
'ParallelMarker': function(parentGfx, element, position) {
|
|
1771
1705
|
var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
|
|
1772
1706
|
xScaleFactor: 1,
|
|
1773
1707
|
yScaleFactor: 1,
|
|
@@ -1779,13 +1713,12 @@ export default function BpmnRenderer(
|
|
|
1779
1713
|
}
|
|
1780
1714
|
});
|
|
1781
1715
|
|
|
1782
|
-
drawMarker('parallel', parentGfx, markerPath,
|
|
1783
|
-
},
|
|
1784
|
-
'SequentialMarker': function(parentGfx, element, attrs, position) {
|
|
1785
|
-
attrs = assign({
|
|
1716
|
+
drawMarker('parallel', parentGfx, markerPath, {
|
|
1786
1717
|
fill: getFillColor(element, defaultFillColor),
|
|
1787
1718
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1788
|
-
}
|
|
1719
|
+
});
|
|
1720
|
+
},
|
|
1721
|
+
'SequentialMarker': function(parentGfx, element, position) {
|
|
1789
1722
|
var markerPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', {
|
|
1790
1723
|
xScaleFactor: 1,
|
|
1791
1724
|
yScaleFactor: 1,
|
|
@@ -1797,15 +1730,12 @@ export default function BpmnRenderer(
|
|
|
1797
1730
|
}
|
|
1798
1731
|
});
|
|
1799
1732
|
|
|
1800
|
-
drawMarker('sequential', parentGfx, markerPath,
|
|
1801
|
-
},
|
|
1802
|
-
'CompensationMarker': function(parentGfx, element, attrs, position) {
|
|
1803
|
-
attrs = assign({
|
|
1804
|
-
strokeWidth: 1,
|
|
1733
|
+
drawMarker('sequential', parentGfx, markerPath, {
|
|
1805
1734
|
fill: getFillColor(element, defaultFillColor),
|
|
1806
1735
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1736
|
+
});
|
|
1737
|
+
},
|
|
1738
|
+
'CompensationMarker': function(parentGfx, element, position) {
|
|
1809
1739
|
var markerMath = pathMap.getScaledPath('MARKER_COMPENSATION', {
|
|
1810
1740
|
xScaleFactor: 1,
|
|
1811
1741
|
yScaleFactor: 1,
|
|
@@ -1817,17 +1747,13 @@ export default function BpmnRenderer(
|
|
|
1817
1747
|
}
|
|
1818
1748
|
});
|
|
1819
1749
|
|
|
1820
|
-
drawMarker('compensation', parentGfx, markerMath,
|
|
1821
|
-
},
|
|
1822
|
-
'LoopMarker': function(parentGfx, element, attrs, position) {
|
|
1823
|
-
attrs = assign({
|
|
1750
|
+
drawMarker('compensation', parentGfx, markerMath, {
|
|
1824
1751
|
strokeWidth: 1,
|
|
1825
1752
|
fill: getFillColor(element, defaultFillColor),
|
|
1826
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1753
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1754
|
+
});
|
|
1755
|
+
},
|
|
1756
|
+
'LoopMarker': function(parentGfx, element, position) {
|
|
1831
1757
|
var markerPath = pathMap.getScaledPath('MARKER_LOOP', {
|
|
1832
1758
|
xScaleFactor: 1,
|
|
1833
1759
|
yScaleFactor: 1,
|
|
@@ -1839,15 +1765,15 @@ export default function BpmnRenderer(
|
|
|
1839
1765
|
}
|
|
1840
1766
|
});
|
|
1841
1767
|
|
|
1842
|
-
drawMarker('loop', parentGfx, markerPath,
|
|
1843
|
-
},
|
|
1844
|
-
'AdhocMarker': function(parentGfx, element, attrs, position) {
|
|
1845
|
-
attrs = assign({
|
|
1768
|
+
drawMarker('loop', parentGfx, markerPath, {
|
|
1846
1769
|
strokeWidth: 1,
|
|
1847
|
-
fill:
|
|
1848
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1849
|
-
|
|
1850
|
-
|
|
1770
|
+
fill: getFillColor(element, defaultFillColor),
|
|
1771
|
+
stroke: getStrokeColor(element, defaultStrokeColor),
|
|
1772
|
+
strokeLinecap: 'round',
|
|
1773
|
+
strokeMiterlimit: 0.5
|
|
1774
|
+
});
|
|
1775
|
+
},
|
|
1776
|
+
'AdhocMarker': function(parentGfx, element, position) {
|
|
1851
1777
|
var markerPath = pathMap.getScaledPath('MARKER_ADHOC', {
|
|
1852
1778
|
xScaleFactor: 1,
|
|
1853
1779
|
yScaleFactor: 1,
|
|
@@ -1859,11 +1785,15 @@ export default function BpmnRenderer(
|
|
|
1859
1785
|
}
|
|
1860
1786
|
});
|
|
1861
1787
|
|
|
1862
|
-
drawMarker('adhoc', parentGfx, markerPath,
|
|
1788
|
+
drawMarker('adhoc', parentGfx, markerPath, {
|
|
1789
|
+
strokeWidth: 1,
|
|
1790
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1791
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1792
|
+
});
|
|
1863
1793
|
}
|
|
1864
1794
|
};
|
|
1865
1795
|
|
|
1866
|
-
function attachTaskMarkers(parentGfx, element,
|
|
1796
|
+
function attachTaskMarkers(parentGfx, element, taskMarkers) {
|
|
1867
1797
|
var obj = getSemantic(element);
|
|
1868
1798
|
|
|
1869
1799
|
var subprocess = taskMarkers && taskMarkers.indexOf('SubProcessMarker') !== -1;
|
|
@@ -1888,15 +1818,15 @@ export default function BpmnRenderer(
|
|
|
1888
1818
|
}
|
|
1889
1819
|
|
|
1890
1820
|
forEach(taskMarkers, function(marker) {
|
|
1891
|
-
renderer(marker)(parentGfx, element,
|
|
1821
|
+
renderer(marker)(parentGfx, element, position);
|
|
1892
1822
|
});
|
|
1893
1823
|
|
|
1894
1824
|
if (obj.isForCompensation) {
|
|
1895
|
-
renderer('CompensationMarker')(parentGfx, element,
|
|
1825
|
+
renderer('CompensationMarker')(parentGfx, element, position);
|
|
1896
1826
|
}
|
|
1897
1827
|
|
|
1898
1828
|
if (obj.$type === 'bpmn:AdHocSubProcess') {
|
|
1899
|
-
renderer('AdhocMarker')(parentGfx, element,
|
|
1829
|
+
renderer('AdhocMarker')(parentGfx, element, position);
|
|
1900
1830
|
}
|
|
1901
1831
|
|
|
1902
1832
|
var loopCharacteristics = obj.loopCharacteristics,
|
|
@@ -1905,23 +1835,20 @@ export default function BpmnRenderer(
|
|
|
1905
1835
|
if (loopCharacteristics) {
|
|
1906
1836
|
|
|
1907
1837
|
if (isSequential === undefined) {
|
|
1908
|
-
renderer('LoopMarker')(parentGfx, element,
|
|
1838
|
+
renderer('LoopMarker')(parentGfx, element, position);
|
|
1909
1839
|
}
|
|
1910
1840
|
|
|
1911
1841
|
if (isSequential === false) {
|
|
1912
|
-
renderer('ParallelMarker')(parentGfx, element,
|
|
1842
|
+
renderer('ParallelMarker')(parentGfx, element, position);
|
|
1913
1843
|
}
|
|
1914
1844
|
|
|
1915
1845
|
if (isSequential === true) {
|
|
1916
|
-
renderer('SequentialMarker')(parentGfx, element,
|
|
1846
|
+
renderer('SequentialMarker')(parentGfx, element, position);
|
|
1917
1847
|
}
|
|
1918
1848
|
}
|
|
1919
1849
|
}
|
|
1920
1850
|
|
|
1921
|
-
function renderDataItemCollection(parentGfx, element
|
|
1922
|
-
attrs = assign({
|
|
1923
|
-
strokeWidth: 2
|
|
1924
|
-
}, attrs);
|
|
1851
|
+
function renderDataItemCollection(parentGfx, element) {
|
|
1925
1852
|
|
|
1926
1853
|
var yPosition = (element.height - 18) / element.height;
|
|
1927
1854
|
|
|
@@ -1936,13 +1863,16 @@ export default function BpmnRenderer(
|
|
|
1936
1863
|
}
|
|
1937
1864
|
});
|
|
1938
1865
|
|
|
1939
|
-
/* collection path */ drawPath(parentGfx, pathData,
|
|
1866
|
+
/* collection path */ drawPath(parentGfx, pathData, {
|
|
1867
|
+
strokeWidth: 2
|
|
1868
|
+
});
|
|
1940
1869
|
}
|
|
1941
1870
|
|
|
1942
1871
|
|
|
1943
1872
|
// extension API, use at your own risk
|
|
1944
1873
|
this._drawPath = drawPath;
|
|
1945
1874
|
|
|
1875
|
+
this._renderer = renderer;
|
|
1946
1876
|
}
|
|
1947
1877
|
|
|
1948
1878
|
|
|
@@ -1962,20 +1892,20 @@ BpmnRenderer.prototype.canRender = function(element) {
|
|
|
1962
1892
|
return is(element, 'bpmn:BaseElement');
|
|
1963
1893
|
};
|
|
1964
1894
|
|
|
1965
|
-
BpmnRenderer.prototype.drawShape = function(parentGfx, element
|
|
1895
|
+
BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
1966
1896
|
var type = element.type;
|
|
1967
|
-
var h = this.
|
|
1897
|
+
var h = this._renderer(type);
|
|
1968
1898
|
|
|
1969
1899
|
/* jshint -W040 */
|
|
1970
|
-
return h(parentGfx, element
|
|
1900
|
+
return h(parentGfx, element);
|
|
1971
1901
|
};
|
|
1972
1902
|
|
|
1973
|
-
BpmnRenderer.prototype.drawConnection = function(parentGfx, element
|
|
1903
|
+
BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
|
|
1974
1904
|
var type = element.type;
|
|
1975
|
-
var h = this.
|
|
1905
|
+
var h = this._renderer(type);
|
|
1976
1906
|
|
|
1977
1907
|
/* jshint -W040 */
|
|
1978
|
-
return h(parentGfx, element
|
|
1908
|
+
return h(parentGfx, element);
|
|
1979
1909
|
};
|
|
1980
1910
|
|
|
1981
1911
|
BpmnRenderer.prototype.getShapePath = function(element) {
|