mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 17:44:12 +00:00
parent
89719de3be
commit
2fff30a284
@ -1,12 +1,15 @@
|
|||||||
import { is } from '../../util/ModelUtil';
|
import { is } from '../../util/ModelUtil';
|
||||||
|
|
||||||
function getLabelAttr(semantic) {
|
function getLabelAttr(semantic) {
|
||||||
if (is(semantic, 'bpmn:FlowElement') ||
|
if (
|
||||||
is(semantic, 'bpmn:Participant') ||
|
is(semantic, 'bpmn:FlowElement') ||
|
||||||
is(semantic, 'bpmn:Lane') ||
|
is(semantic, 'bpmn:Participant') ||
|
||||||
is(semantic, 'bpmn:SequenceFlow') ||
|
is(semantic, 'bpmn:Lane') ||
|
||||||
is(semantic, 'bpmn:MessageFlow')) {
|
is(semantic, 'bpmn:SequenceFlow') ||
|
||||||
|
is(semantic, 'bpmn:MessageFlow') ||
|
||||||
|
is(semantic, 'bpmn:DataInput') ||
|
||||||
|
is(semantic, 'bpmn:DataOutput')
|
||||||
|
) {
|
||||||
return 'name';
|
return 'name';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,16 @@
|
|||||||
<bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
|
<bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
|
||||||
</bpmn:lane>
|
</bpmn:lane>
|
||||||
</bpmn:laneSet>
|
</bpmn:laneSet>
|
||||||
|
<bpmn:ioSpecification>
|
||||||
|
<bpmn:dataInput name="Input" isCollection="false" id="DataInput"/>
|
||||||
|
<bpmn:dataOutput name="Output" isCollection="false" id="DataOutput"/>
|
||||||
|
<bpmn:inputSet id="_9f9aea93-30cd-4899-bbe1-e62165c3dbc9">
|
||||||
|
<bpmn:dataInputRefs>DataInput</bpmn:dataInputRefs>
|
||||||
|
</bpmn:inputSet>
|
||||||
|
<bpmn:outputSet id="_8154d47e-5733-41c1-8125-29ff926b3cd2">
|
||||||
|
<bpmn:dataOutputRefs>DataOutput</bpmn:dataOutputRefs>
|
||||||
|
</bpmn:outputSet>
|
||||||
|
</bpmn:ioSpecification>
|
||||||
<bpmn:startEvent id="StartEvent_1" name="FOO">
|
<bpmn:startEvent id="StartEvent_1" name="FOO">
|
||||||
<bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
|
<bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
|
||||||
</bpmn:startEvent>
|
</bpmn:startEvent>
|
||||||
@ -173,6 +183,18 @@
|
|||||||
<bpmndi:BPMNShape id="Participant_0kzj58d_di" bpmnElement="Participant_2">
|
<bpmndi:BPMNShape id="Participant_0kzj58d_di" bpmnElement="Participant_2">
|
||||||
<dc:Bounds x="161" y="646" width="600" height="250" />
|
<dc:Bounds x="161" y="646" width="600" height="250" />
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="DataOutput_di" bpmnElement="DataOutput">
|
||||||
|
<dc:Bounds x="265" y="150" width="34" height="40"/>
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds height="12" width="30" x="265" y="195"/>
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="DataInput_di" bpmnElement="DataInput">
|
||||||
|
<dc:Bounds x="220" y="150" width="34" height="40"/>
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds height="12" width="30" x="220" y="200"/>
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn:definitions>
|
</bpmn:definitions>
|
||||||
|
@ -22,6 +22,7 @@ describe('features - label-editing', function() {
|
|||||||
|
|
||||||
var diagramXML = require('./LabelEditing.bpmn');
|
var diagramXML = require('./LabelEditing.bpmn');
|
||||||
|
|
||||||
|
|
||||||
describe('basics', function() {
|
describe('basics', function() {
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(diagramXML, {
|
beforeEach(bootstrapModeler(diagramXML, {
|
||||||
@ -405,7 +406,13 @@ describe('features - label-editing', function() {
|
|||||||
|
|
||||||
it('lane without label', directEdit('Lane_2'));
|
it('lane without label', directEdit('Lane_2'));
|
||||||
|
|
||||||
|
|
||||||
|
it('data input', directEdit('DataInput'));
|
||||||
|
|
||||||
|
it('data output', directEdit('DataOutput'));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user