mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-02-08 23:25:04 +00:00
parent
d41cad1b67
commit
d4e55f0ba3
@ -97,7 +97,8 @@ function importBpmnDiagram(diagram, definitions, done) {
|
|||||||
var label = _.extend({
|
var label = _.extend({
|
||||||
id: element.id + '_label',
|
id: element.id + '_label',
|
||||||
attachedId: element.id,
|
attachedId: element.id,
|
||||||
type: 'label'
|
type: 'label',
|
||||||
|
hidden: data.hidden
|
||||||
}, labelBounds);
|
}, labelBounds);
|
||||||
|
|
||||||
canvas.addShape(label);
|
canvas.addShape(label);
|
||||||
|
20
test/fixtures/bpmn/import/collapsed.bpmn
vendored
20
test/fixtures/bpmn/import/collapsed.bpmn
vendored
@ -18,6 +18,11 @@
|
|||||||
<bpmn2:task id="Task_3"/>
|
<bpmn2:task id="Task_3"/>
|
||||||
</bpmn2:subProcess>
|
</bpmn2:subProcess>
|
||||||
</bpmn2:subProcess>
|
</bpmn2:subProcess>
|
||||||
|
<bpmn2:subProcess id="SubProcess_2">
|
||||||
|
<bpmn2:dataObject id="DataObject_1" name="Data Object 1"/>
|
||||||
|
<bpmn2:startEvent id="StartEvent_2" name="start event"/>
|
||||||
|
<bpmn2:dataObjectReference id="DataObjectReference_1" name="data object" dataObjectRef="DataObject_1"/>
|
||||||
|
</bpmn2:subProcess>
|
||||||
</bpmn2:process>
|
</bpmn2:process>
|
||||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
|
||||||
@ -60,6 +65,21 @@
|
|||||||
<bpmndi:BPMNShape id="_BPMNShape_Task_8" bpmnElement="Task_3">
|
<bpmndi:BPMNShape id="_BPMNShape_Task_8" bpmnElement="Task_3">
|
||||||
<dc:Bounds height="80.0" width="100.0" x="648.0" y="108.0"/>
|
<dc:Bounds height="80.0" width="100.0" x="648.0" y="108.0"/>
|
||||||
</bpmndi:BPMNShape>
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_SubProcess_7" bpmnElement="SubProcess_2">
|
||||||
|
<dc:Bounds height="80.0" width="100.0" x="405.0" y="276.0"/>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_3" bpmnElement="StartEvent_2">
|
||||||
|
<dc:Bounds height="36.0" width="36.0" x="395.0" y="296.0"/>
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds height="22.0" width="66.0" x="380.0" y="337.0"/>
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
|
<bpmndi:BPMNShape id="_BPMNShape_DataObjectReference_3" bpmnElement="DataObjectReference_1">
|
||||||
|
<dc:Bounds height="50.0" width="36.0" x="479.0" y="291.0"/>
|
||||||
|
<bpmndi:BPMNLabel>
|
||||||
|
<dc:Bounds height="22.0" width="70.0" x="462.0" y="346.0"/>
|
||||||
|
</bpmndi:BPMNLabel>
|
||||||
|
</bpmndi:BPMNShape>
|
||||||
</bpmndi:BPMNPlane>
|
</bpmndi:BPMNPlane>
|
||||||
</bpmndi:BPMNDiagram>
|
</bpmndi:BPMNDiagram>
|
||||||
</bpmn2:definitions>
|
</bpmn2:definitions>
|
@ -99,6 +99,18 @@ describe('import - collapsed container', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
it('should import collapsed with nested elements', function() {
|
||||||
|
|
||||||
|
var elementRegistry = renderer.get('elementRegistry');
|
||||||
|
|
||||||
|
var hiddenEventShape = elementRegistry.getById('StartEvent_2');
|
||||||
|
expect(hiddenEventShape.label.hidden).toBe(true);
|
||||||
|
|
||||||
|
var hiddenDataShape = elementRegistry.getById('DataObjectReference_1');
|
||||||
|
expect(hiddenDataShape.label.hidden).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should import expanded subProcess', function() {
|
it('should import expanded subProcess', function() {
|
||||||
|
|
||||||
var elementRegistry = renderer.get('elementRegistry');
|
var elementRegistry = renderer.get('elementRegistry');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user