mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-02-05 21:53:48 +00:00
chore(import): use is helper
This commit is contained in:
parent
1bceaaa229
commit
fa2254f0ef
@ -66,7 +66,7 @@ BpmnImporter.prototype.add = function(semantic, parentElement) {
|
|||||||
// ROOT ELEMENT
|
// ROOT ELEMENT
|
||||||
// handle the special case that we deal with a
|
// handle the special case that we deal with a
|
||||||
// invisible root element (process or collaboration)
|
// invisible root element (process or collaboration)
|
||||||
if (di.$instanceOf('bpmndi:BPMNPlane')) {
|
if (is(di, 'bpmndi:BPMNPlane')) {
|
||||||
|
|
||||||
// add a virtual element (not being drawn)
|
// add a virtual element (not being drawn)
|
||||||
element = this._elementFactory.createRoot(elementData(semantic));
|
element = this._elementFactory.createRoot(elementData(semantic));
|
||||||
@ -75,7 +75,7 @@ BpmnImporter.prototype.add = function(semantic, parentElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SHAPE
|
// SHAPE
|
||||||
else if (di.$instanceOf('bpmndi:BPMNShape')) {
|
else if (is(di, 'bpmndi:BPMNShape')) {
|
||||||
|
|
||||||
var collapsed = !isExpanded(semantic);
|
var collapsed = !isExpanded(semantic);
|
||||||
var hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
|
var hidden = parentElement && (parentElement.hidden || parentElement.collapsed);
|
||||||
@ -99,7 +99,7 @@ BpmnImporter.prototype.add = function(semantic, parentElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CONNECTION
|
// CONNECTION
|
||||||
else if (di.$instanceOf('bpmndi:BPMNEdge')) {
|
else if (is(di, 'bpmndi:BPMNEdge')) {
|
||||||
|
|
||||||
var source = this._getSource(semantic),
|
var source = this._getSource(semantic),
|
||||||
target = this._getTarget(semantic);
|
target = this._getTarget(semantic);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user