chore(import): use is helper

This commit is contained in:
Nico Rehwaldt 2016-03-08 14:24:50 +01:00
parent 1bceaaa229
commit fa2254f0ef

View File

@ -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);