bpmn-js 9.0.0-subprocesses.2 → 9.0.0-subprocesses.3
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/dist/assets/bpmn-js.css +32 -10
- package/dist/assets/diagram-js.css +80 -78
- package/dist/bpmn-modeler.development.js +324 -379
- package/dist/bpmn-modeler.production.min.js +7 -7
- package/dist/bpmn-navigated-viewer.development.js +316 -377
- package/dist/bpmn-navigated-viewer.production.min.js +3 -3
- package/dist/bpmn-viewer.development.js +316 -377
- package/dist/bpmn-viewer.production.min.js +3 -3
- package/lib/draw/BpmnRenderer.js +296 -363
- package/lib/features/drilldown/DrilldownOverlays.js +8 -7
- package/package.json +2 -2
package/lib/draw/BpmnRenderer.js
CHANGED
|
@@ -383,8 +383,8 @@ export default function BpmnRenderer(
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function as(type) {
|
|
386
|
-
return function(parentGfx, element
|
|
387
|
-
return handlers[type](parentGfx, element
|
|
386
|
+
return function(parentGfx, element) {
|
|
387
|
+
return handlers[type](parentGfx, element);
|
|
388
388
|
};
|
|
389
389
|
}
|
|
390
390
|
|
|
@@ -392,58 +392,58 @@ export default function BpmnRenderer(
|
|
|
392
392
|
return handlers[type];
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
function renderEventContent(element, parentGfx
|
|
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
|
|
1197
|
+
'bpmn:InclusiveGateway': function(parentGfx, element) {
|
|
1198
|
+
var diamond = renderer('bpmn:Gateway')(parentGfx, element);
|
|
1230
1199
|
|
|
1231
|
-
|
|
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,52 +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
|
-
|
|
1426
|
+
return renderer('bpmn:Association')(parentGfx, element, {
|
|
1467
1427
|
markerEnd: marker('association-end', fill, stroke)
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
return renderer('bpmn:Association')(parentGfx, element, attrs);
|
|
1428
|
+
});
|
|
1471
1429
|
},
|
|
1472
|
-
'bpmn:DataOutputAssociation': function(parentGfx, element
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
var fill = attrs.fill || getFillColor(element, defaultFillColor),
|
|
1476
|
-
stroke = attrs.stroke || getStrokeColor(element, defaultStrokeColor);
|
|
1477
|
-
|
|
1430
|
+
'bpmn:DataOutputAssociation': function(parentGfx, element) {
|
|
1431
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1432
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1478
1433
|
|
|
1479
|
-
|
|
1434
|
+
return renderer('bpmn:Association')(parentGfx, element, {
|
|
1480
1435
|
markerEnd: marker('association-end', fill, stroke)
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
return renderer('bpmn:Association')(parentGfx, element, attrs);
|
|
1436
|
+
});
|
|
1484
1437
|
},
|
|
1485
|
-
'bpmn:MessageFlow': function(parentGfx, element
|
|
1486
|
-
attrs = attrs || {};
|
|
1438
|
+
'bpmn:MessageFlow': function(parentGfx, element) {
|
|
1487
1439
|
|
|
1488
1440
|
var semantic = getSemantic(element),
|
|
1489
1441
|
di = getDi(element);
|
|
1490
1442
|
|
|
1491
|
-
var fill =
|
|
1492
|
-
stroke =
|
|
1443
|
+
var fill = getFillColor(element, defaultFillColor),
|
|
1444
|
+
stroke = getStrokeColor(element, defaultStrokeColor);
|
|
1493
1445
|
|
|
1494
1446
|
var pathData = createPathFromConnection(element);
|
|
1495
1447
|
|
|
1496
|
-
|
|
1497
|
-
attrs = assign({
|
|
1448
|
+
var attrs = {
|
|
1498
1449
|
markerEnd: marker('messageflow-end', fill, stroke),
|
|
1499
1450
|
markerStart: marker('messageflow-start', fill, stroke),
|
|
1500
1451
|
strokeDasharray: '10, 12',
|
|
1501
1452
|
strokeLinecap: 'round',
|
|
1502
1453
|
strokeLinejoin: 'round',
|
|
1503
1454
|
strokeWidth: '1.5px',
|
|
1504
|
-
stroke:
|
|
1505
|
-
}
|
|
1455
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1456
|
+
};
|
|
1506
1457
|
|
|
1507
1458
|
var path = drawPath(parentGfx, pathData, attrs);
|
|
1508
1459
|
|
|
@@ -1549,7 +1500,7 @@ export default function BpmnRenderer(
|
|
|
1549
1500
|
|
|
1550
1501
|
return path;
|
|
1551
1502
|
},
|
|
1552
|
-
'bpmn:DataObject': function(parentGfx, element
|
|
1503
|
+
'bpmn:DataObject': function(parentGfx, element) {
|
|
1553
1504
|
var pathData = pathMap.getScaledPath('DATA_OBJECT_PATH', {
|
|
1554
1505
|
xScaleFactor: 1,
|
|
1555
1506
|
yScaleFactor: 1,
|
|
@@ -1561,56 +1512,46 @@ export default function BpmnRenderer(
|
|
|
1561
1512
|
}
|
|
1562
1513
|
});
|
|
1563
1514
|
|
|
1564
|
-
var
|
|
1515
|
+
var elementObject = drawPath(parentGfx, pathData, {
|
|
1565
1516
|
fill: getFillColor(element, defaultFillColor),
|
|
1566
1517
|
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1567
1518
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1568
|
-
}
|
|
1569
|
-
var elementObject = drawPath(parentGfx, pathData, outerAttrs);
|
|
1519
|
+
});
|
|
1570
1520
|
|
|
1571
1521
|
var semantic = getSemantic(element);
|
|
1572
1522
|
|
|
1573
1523
|
if (isCollection(semantic)) {
|
|
1574
|
-
renderDataItemCollection(parentGfx, element
|
|
1524
|
+
renderDataItemCollection(parentGfx, element);
|
|
1575
1525
|
}
|
|
1576
1526
|
|
|
1577
1527
|
return elementObject;
|
|
1578
1528
|
},
|
|
1579
1529
|
'bpmn:DataObjectReference': as('bpmn:DataObject'),
|
|
1580
|
-
'bpmn:DataInput': function(parentGfx, element
|
|
1530
|
+
'bpmn:DataInput': function(parentGfx, element) {
|
|
1581
1531
|
|
|
1582
1532
|
var arrowPathData = pathMap.getRawPath('DATA_ARROW');
|
|
1583
1533
|
|
|
1584
1534
|
// page
|
|
1585
|
-
var elementObject = renderer('bpmn:DataObject')(parentGfx, element
|
|
1535
|
+
var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
|
|
1586
1536
|
|
|
1587
|
-
|
|
1588
|
-
/* input arrow path */ drawPath(parentGfx, arrowPathData, innerAttrs);
|
|
1537
|
+
/* input arrow path */ drawPath(parentGfx, arrowPathData, { strokeWidth: 1 });
|
|
1589
1538
|
|
|
1590
1539
|
return elementObject;
|
|
1591
1540
|
},
|
|
1592
|
-
'bpmn:DataOutput': function(parentGfx, element
|
|
1541
|
+
'bpmn:DataOutput': function(parentGfx, element) {
|
|
1593
1542
|
var arrowPathData = pathMap.getRawPath('DATA_ARROW');
|
|
1594
1543
|
|
|
1595
1544
|
// page
|
|
1596
|
-
var elementObject = renderer('bpmn:DataObject')(parentGfx, element
|
|
1545
|
+
var elementObject = renderer('bpmn:DataObject')(parentGfx, element);
|
|
1597
1546
|
|
|
1598
|
-
|
|
1547
|
+
/* output arrow path */ drawPath(parentGfx, arrowPathData, {
|
|
1599
1548
|
strokeWidth: 1,
|
|
1600
1549
|
fill: 'black'
|
|
1601
|
-
}
|
|
1602
|
-
/* output arrow path */ drawPath(parentGfx, arrowPathData, arrowAttrs);
|
|
1550
|
+
});
|
|
1603
1551
|
|
|
1604
1552
|
return elementObject;
|
|
1605
1553
|
},
|
|
1606
|
-
'bpmn:DataStoreReference': function(parentGfx, element
|
|
1607
|
-
attrs = assign({
|
|
1608
|
-
strokeWidth: 2,
|
|
1609
|
-
fill: getFillColor(element, defaultFillColor),
|
|
1610
|
-
fillOpacity: DEFAULT_FILL_OPACITY,
|
|
1611
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1612
|
-
}, attrs);
|
|
1613
|
-
|
|
1554
|
+
'bpmn:DataStoreReference': function(parentGfx, element) {
|
|
1614
1555
|
var DATA_STORE_PATH = pathMap.getScaledPath('DATA_STORE', {
|
|
1615
1556
|
xScaleFactor: 1,
|
|
1616
1557
|
yScaleFactor: 1,
|
|
@@ -1622,20 +1563,25 @@ export default function BpmnRenderer(
|
|
|
1622
1563
|
}
|
|
1623
1564
|
});
|
|
1624
1565
|
|
|
1625
|
-
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
|
+
});
|
|
1626
1572
|
|
|
1627
1573
|
return elementStore;
|
|
1628
1574
|
},
|
|
1629
|
-
'bpmn:BoundaryEvent': function(parentGfx, element
|
|
1575
|
+
'bpmn:BoundaryEvent': function(parentGfx, element) {
|
|
1630
1576
|
|
|
1631
1577
|
var semantic = getSemantic(element),
|
|
1632
1578
|
cancel = semantic.cancelActivity;
|
|
1633
1579
|
|
|
1634
|
-
attrs =
|
|
1580
|
+
var attrs = {
|
|
1635
1581
|
strokeWidth: 1,
|
|
1636
1582
|
fill: getFillColor(element, defaultFillColor),
|
|
1637
1583
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1638
|
-
}
|
|
1584
|
+
};
|
|
1639
1585
|
|
|
1640
1586
|
if (!cancel) {
|
|
1641
1587
|
attrs.strokeDasharray = '6';
|
|
@@ -1656,32 +1602,30 @@ export default function BpmnRenderer(
|
|
|
1656
1602
|
|
|
1657
1603
|
/* inner path */ drawCircle(parentGfx, element.width, element.height, INNER_OUTER_DIST, innerAttrs);
|
|
1658
1604
|
|
|
1659
|
-
renderEventContent(element, parentGfx
|
|
1605
|
+
renderEventContent(element, parentGfx);
|
|
1660
1606
|
|
|
1661
1607
|
return outer;
|
|
1662
1608
|
},
|
|
1663
|
-
'bpmn:Group': function(parentGfx, element
|
|
1609
|
+
'bpmn:Group': function(parentGfx, element) {
|
|
1664
1610
|
|
|
1665
|
-
|
|
1611
|
+
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
|
|
1666
1612
|
stroke: getStrokeColor(element, defaultStrokeColor),
|
|
1667
1613
|
strokeWidth: 1,
|
|
1668
1614
|
strokeDasharray: '8,3,1,3',
|
|
1669
1615
|
fill: 'none',
|
|
1670
1616
|
pointerEvents: 'none'
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, attrs);
|
|
1617
|
+
});
|
|
1674
1618
|
|
|
1675
1619
|
return group;
|
|
1676
1620
|
},
|
|
1677
1621
|
'label': function(parentGfx, element) {
|
|
1678
1622
|
return renderExternalLabel(parentGfx, element);
|
|
1679
1623
|
},
|
|
1680
|
-
'bpmn:TextAnnotation': function(parentGfx, element
|
|
1681
|
-
var style =
|
|
1624
|
+
'bpmn:TextAnnotation': function(parentGfx, element) {
|
|
1625
|
+
var style = {
|
|
1682
1626
|
'fill': 'none',
|
|
1683
1627
|
'stroke': 'none'
|
|
1684
|
-
}
|
|
1628
|
+
};
|
|
1685
1629
|
|
|
1686
1630
|
var textElement = drawRect(parentGfx, element.width, element.height, 0, 0, style);
|
|
1687
1631
|
|
|
@@ -1696,10 +1640,9 @@ export default function BpmnRenderer(
|
|
|
1696
1640
|
}
|
|
1697
1641
|
});
|
|
1698
1642
|
|
|
1699
|
-
|
|
1643
|
+
drawPath(parentGfx, textPathData, {
|
|
1700
1644
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1701
|
-
}
|
|
1702
|
-
drawPath(parentGfx, textPathData, pathAttrs);
|
|
1645
|
+
});
|
|
1703
1646
|
|
|
1704
1647
|
var text = getSemantic(element).text || '';
|
|
1705
1648
|
renderLabel(parentGfx, text, {
|
|
@@ -1713,13 +1656,7 @@ export default function BpmnRenderer(
|
|
|
1713
1656
|
|
|
1714
1657
|
return textElement;
|
|
1715
1658
|
},
|
|
1716
|
-
'ParticipantMultiplicityMarker': function(parentGfx, element
|
|
1717
|
-
attrs = assign({
|
|
1718
|
-
strokeWidth: 2,
|
|
1719
|
-
fill: getFillColor(element, defaultFillColor),
|
|
1720
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1721
|
-
}, attrs);
|
|
1722
|
-
|
|
1659
|
+
'ParticipantMultiplicityMarker': function(parentGfx, element) {
|
|
1723
1660
|
var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
|
|
1724
1661
|
xScaleFactor: 1,
|
|
1725
1662
|
yScaleFactor: 1,
|
|
@@ -1731,15 +1668,18 @@ export default function BpmnRenderer(
|
|
|
1731
1668
|
}
|
|
1732
1669
|
});
|
|
1733
1670
|
|
|
1734
|
-
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
|
+
});
|
|
1735
1676
|
},
|
|
1736
|
-
'SubProcessMarker': function(parentGfx, element
|
|
1737
|
-
|
|
1677
|
+
'SubProcessMarker': function(parentGfx, element) {
|
|
1678
|
+
var markerRect = drawRect(parentGfx, 14, 14, 0, {
|
|
1679
|
+
strokeWidth: 1,
|
|
1738
1680
|
fill: getFillColor(element, defaultFillColor),
|
|
1739
1681
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
var markerRect = drawRect(parentGfx, 14, 14, 0, assign({ strokeWidth: 1 }, attrs));
|
|
1682
|
+
});
|
|
1743
1683
|
|
|
1744
1684
|
// Process marker is placed in the middle of the box
|
|
1745
1685
|
// therefore fixed values can be used here
|
|
@@ -1756,14 +1696,12 @@ export default function BpmnRenderer(
|
|
|
1756
1696
|
}
|
|
1757
1697
|
});
|
|
1758
1698
|
|
|
1759
|
-
drawMarker('sub-process', parentGfx, markerPath,
|
|
1760
|
-
},
|
|
1761
|
-
'ParallelMarker': function(parentGfx, element, attrs, position) {
|
|
1762
|
-
attrs = assign({
|
|
1699
|
+
drawMarker('sub-process', parentGfx, markerPath, {
|
|
1763
1700
|
fill: getFillColor(element, defaultFillColor),
|
|
1764
1701
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1702
|
+
});
|
|
1703
|
+
},
|
|
1704
|
+
'ParallelMarker': function(parentGfx, element, position) {
|
|
1767
1705
|
var markerPath = pathMap.getScaledPath('MARKER_PARALLEL', {
|
|
1768
1706
|
xScaleFactor: 1,
|
|
1769
1707
|
yScaleFactor: 1,
|
|
@@ -1775,13 +1713,12 @@ export default function BpmnRenderer(
|
|
|
1775
1713
|
}
|
|
1776
1714
|
});
|
|
1777
1715
|
|
|
1778
|
-
drawMarker('parallel', parentGfx, markerPath,
|
|
1779
|
-
},
|
|
1780
|
-
'SequentialMarker': function(parentGfx, element, attrs, position) {
|
|
1781
|
-
attrs = assign({
|
|
1716
|
+
drawMarker('parallel', parentGfx, markerPath, {
|
|
1782
1717
|
fill: getFillColor(element, defaultFillColor),
|
|
1783
1718
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1784
|
-
}
|
|
1719
|
+
});
|
|
1720
|
+
},
|
|
1721
|
+
'SequentialMarker': function(parentGfx, element, position) {
|
|
1785
1722
|
var markerPath = pathMap.getScaledPath('MARKER_SEQUENTIAL', {
|
|
1786
1723
|
xScaleFactor: 1,
|
|
1787
1724
|
yScaleFactor: 1,
|
|
@@ -1793,15 +1730,12 @@ export default function BpmnRenderer(
|
|
|
1793
1730
|
}
|
|
1794
1731
|
});
|
|
1795
1732
|
|
|
1796
|
-
drawMarker('sequential', parentGfx, markerPath,
|
|
1797
|
-
},
|
|
1798
|
-
'CompensationMarker': function(parentGfx, element, attrs, position) {
|
|
1799
|
-
attrs = assign({
|
|
1800
|
-
strokeWidth: 1,
|
|
1733
|
+
drawMarker('sequential', parentGfx, markerPath, {
|
|
1801
1734
|
fill: getFillColor(element, defaultFillColor),
|
|
1802
1735
|
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1736
|
+
});
|
|
1737
|
+
},
|
|
1738
|
+
'CompensationMarker': function(parentGfx, element, position) {
|
|
1805
1739
|
var markerMath = pathMap.getScaledPath('MARKER_COMPENSATION', {
|
|
1806
1740
|
xScaleFactor: 1,
|
|
1807
1741
|
yScaleFactor: 1,
|
|
@@ -1813,17 +1747,13 @@ export default function BpmnRenderer(
|
|
|
1813
1747
|
}
|
|
1814
1748
|
});
|
|
1815
1749
|
|
|
1816
|
-
drawMarker('compensation', parentGfx, markerMath,
|
|
1817
|
-
},
|
|
1818
|
-
'LoopMarker': function(parentGfx, element, attrs, position) {
|
|
1819
|
-
attrs = assign({
|
|
1750
|
+
drawMarker('compensation', parentGfx, markerMath, {
|
|
1820
1751
|
strokeWidth: 1,
|
|
1821
1752
|
fill: getFillColor(element, defaultFillColor),
|
|
1822
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1753
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1754
|
+
});
|
|
1755
|
+
},
|
|
1756
|
+
'LoopMarker': function(parentGfx, element, position) {
|
|
1827
1757
|
var markerPath = pathMap.getScaledPath('MARKER_LOOP', {
|
|
1828
1758
|
xScaleFactor: 1,
|
|
1829
1759
|
yScaleFactor: 1,
|
|
@@ -1835,15 +1765,15 @@ export default function BpmnRenderer(
|
|
|
1835
1765
|
}
|
|
1836
1766
|
});
|
|
1837
1767
|
|
|
1838
|
-
drawMarker('loop', parentGfx, markerPath,
|
|
1839
|
-
},
|
|
1840
|
-
'AdhocMarker': function(parentGfx, element, attrs, position) {
|
|
1841
|
-
attrs = assign({
|
|
1768
|
+
drawMarker('loop', parentGfx, markerPath, {
|
|
1842
1769
|
strokeWidth: 1,
|
|
1843
|
-
fill:
|
|
1844
|
-
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1845
|
-
|
|
1846
|
-
|
|
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) {
|
|
1847
1777
|
var markerPath = pathMap.getScaledPath('MARKER_ADHOC', {
|
|
1848
1778
|
xScaleFactor: 1,
|
|
1849
1779
|
yScaleFactor: 1,
|
|
@@ -1855,11 +1785,15 @@ export default function BpmnRenderer(
|
|
|
1855
1785
|
}
|
|
1856
1786
|
});
|
|
1857
1787
|
|
|
1858
|
-
drawMarker('adhoc', parentGfx, markerPath,
|
|
1788
|
+
drawMarker('adhoc', parentGfx, markerPath, {
|
|
1789
|
+
strokeWidth: 1,
|
|
1790
|
+
fill: getStrokeColor(element, defaultStrokeColor),
|
|
1791
|
+
stroke: getStrokeColor(element, defaultStrokeColor)
|
|
1792
|
+
});
|
|
1859
1793
|
}
|
|
1860
1794
|
};
|
|
1861
1795
|
|
|
1862
|
-
function attachTaskMarkers(parentGfx, element,
|
|
1796
|
+
function attachTaskMarkers(parentGfx, element, taskMarkers) {
|
|
1863
1797
|
var obj = getSemantic(element);
|
|
1864
1798
|
|
|
1865
1799
|
var subprocess = taskMarkers && taskMarkers.indexOf('SubProcessMarker') !== -1;
|
|
@@ -1884,15 +1818,15 @@ export default function BpmnRenderer(
|
|
|
1884
1818
|
}
|
|
1885
1819
|
|
|
1886
1820
|
forEach(taskMarkers, function(marker) {
|
|
1887
|
-
renderer(marker)(parentGfx, element,
|
|
1821
|
+
renderer(marker)(parentGfx, element, position);
|
|
1888
1822
|
});
|
|
1889
1823
|
|
|
1890
1824
|
if (obj.isForCompensation) {
|
|
1891
|
-
renderer('CompensationMarker')(parentGfx, element,
|
|
1825
|
+
renderer('CompensationMarker')(parentGfx, element, position);
|
|
1892
1826
|
}
|
|
1893
1827
|
|
|
1894
1828
|
if (obj.$type === 'bpmn:AdHocSubProcess') {
|
|
1895
|
-
renderer('AdhocMarker')(parentGfx, element,
|
|
1829
|
+
renderer('AdhocMarker')(parentGfx, element, position);
|
|
1896
1830
|
}
|
|
1897
1831
|
|
|
1898
1832
|
var loopCharacteristics = obj.loopCharacteristics,
|
|
@@ -1901,23 +1835,20 @@ export default function BpmnRenderer(
|
|
|
1901
1835
|
if (loopCharacteristics) {
|
|
1902
1836
|
|
|
1903
1837
|
if (isSequential === undefined) {
|
|
1904
|
-
renderer('LoopMarker')(parentGfx, element,
|
|
1838
|
+
renderer('LoopMarker')(parentGfx, element, position);
|
|
1905
1839
|
}
|
|
1906
1840
|
|
|
1907
1841
|
if (isSequential === false) {
|
|
1908
|
-
renderer('ParallelMarker')(parentGfx, element,
|
|
1842
|
+
renderer('ParallelMarker')(parentGfx, element, position);
|
|
1909
1843
|
}
|
|
1910
1844
|
|
|
1911
1845
|
if (isSequential === true) {
|
|
1912
|
-
renderer('SequentialMarker')(parentGfx, element,
|
|
1846
|
+
renderer('SequentialMarker')(parentGfx, element, position);
|
|
1913
1847
|
}
|
|
1914
1848
|
}
|
|
1915
1849
|
}
|
|
1916
1850
|
|
|
1917
|
-
function renderDataItemCollection(parentGfx, element
|
|
1918
|
-
attrs = assign({
|
|
1919
|
-
strokeWidth: 2
|
|
1920
|
-
}, attrs);
|
|
1851
|
+
function renderDataItemCollection(parentGfx, element) {
|
|
1921
1852
|
|
|
1922
1853
|
var yPosition = (element.height - 18) / element.height;
|
|
1923
1854
|
|
|
@@ -1932,7 +1863,9 @@ export default function BpmnRenderer(
|
|
|
1932
1863
|
}
|
|
1933
1864
|
});
|
|
1934
1865
|
|
|
1935
|
-
/* collection path */ drawPath(parentGfx, pathData,
|
|
1866
|
+
/* collection path */ drawPath(parentGfx, pathData, {
|
|
1867
|
+
strokeWidth: 2
|
|
1868
|
+
});
|
|
1936
1869
|
}
|
|
1937
1870
|
|
|
1938
1871
|
|
|
@@ -1958,20 +1891,20 @@ BpmnRenderer.prototype.canRender = function(element) {
|
|
|
1958
1891
|
return is(element, 'bpmn:BaseElement');
|
|
1959
1892
|
};
|
|
1960
1893
|
|
|
1961
|
-
BpmnRenderer.prototype.drawShape = function(parentGfx, element
|
|
1894
|
+
BpmnRenderer.prototype.drawShape = function(parentGfx, element) {
|
|
1962
1895
|
var type = element.type;
|
|
1963
1896
|
var h = this.handlers[type];
|
|
1964
1897
|
|
|
1965
1898
|
/* jshint -W040 */
|
|
1966
|
-
return h(parentGfx, element
|
|
1899
|
+
return h(parentGfx, element);
|
|
1967
1900
|
};
|
|
1968
1901
|
|
|
1969
|
-
BpmnRenderer.prototype.drawConnection = function(parentGfx, element
|
|
1902
|
+
BpmnRenderer.prototype.drawConnection = function(parentGfx, element) {
|
|
1970
1903
|
var type = element.type;
|
|
1971
1904
|
var h = this.handlers[type];
|
|
1972
1905
|
|
|
1973
1906
|
/* jshint -W040 */
|
|
1974
|
-
return h(parentGfx, element
|
|
1907
|
+
return h(parentGfx, element);
|
|
1975
1908
|
};
|
|
1976
1909
|
|
|
1977
1910
|
BpmnRenderer.prototype.getShapePath = function(element) {
|