bpmn-js 9.0.0 → 9.0.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.
@@ -68,6 +68,11 @@ SubprocessCompatibility.prototype.createNewDiagrams = function(plane) {
68
68
 
69
69
  plane.get('planeElement').forEach(function(diElement) {
70
70
  var bo = diElement.bpmnElement;
71
+
72
+ if (!bo) {
73
+ return;
74
+ }
75
+
71
76
  var parent = bo.$parent;
72
77
 
73
78
  if (is(bo, 'bpmn:SubProcess') && !diElement.isExpanded) {
@@ -97,7 +102,7 @@ SubprocessCompatibility.prototype.createNewDiagrams = function(plane) {
97
102
  var parent = element.parent;
98
103
 
99
104
  // parent is expanded, get nearest collapsed parent
100
- while (parent && !collapsedElements.includes(parent)) {
105
+ while (parent && collapsedElements.indexOf(parent) === -1) {
101
106
  parent = parent.$parent;
102
107
  }
103
108
 
@@ -48,7 +48,8 @@ export default function LabelEditingProvider(
48
48
  'canvas.viewbox.changing',
49
49
  'drag.init',
50
50
  'element.mousedown',
51
- 'popupMenu.open'
51
+ 'popupMenu.open',
52
+ 'root.set'
52
53
  ], function(event) {
53
54
 
54
55
  if (directEditing.isActive()) {
@@ -24,7 +24,7 @@ var HIGH_PRIORITY = 2000;
24
24
  */
25
25
  export default function GroupBehavior(
26
26
  bpmnFactory,
27
- canvas,
27
+ bpmnjs,
28
28
  elementRegistry,
29
29
  eventBus,
30
30
  injector,
@@ -32,18 +32,6 @@ export default function GroupBehavior(
32
32
  ) {
33
33
  injector.invoke(CommandInterceptor, this);
34
34
 
35
- /**
36
- * Gets process definitions
37
- *
38
- * @return {ModdleElement} definitions
39
- */
40
- function getDefinitions() {
41
- var rootElement = canvas.getRootElement(),
42
- businessObject = getBusinessObject(rootElement);
43
-
44
- return businessObject.$parent;
45
- }
46
-
47
35
  /**
48
36
  * Removes a referenced category value for a given group shape
49
37
  *
@@ -79,7 +67,7 @@ export default function GroupBehavior(
79
67
  */
80
68
  function removeCategory(category) {
81
69
 
82
- var definitions = getDefinitions();
70
+ var definitions = bpmnjs.getDefinitions();
83
71
 
84
72
  collectionRemove(definitions.get('rootElements'), category);
85
73
  }
@@ -144,7 +132,7 @@ export default function GroupBehavior(
144
132
 
145
133
  var businessObject = getBusinessObject(shape),
146
134
  categoryValueRef = businessObject.categoryValueRef,
147
- definitions = getDefinitions(),
135
+ definitions = bpmnjs.getDefinitions(),
148
136
  category = categoryValueRef ? categoryValueRef.$parent : null;
149
137
 
150
138
  collectionAdd(category.get('categoryValue'), categoryValueRef);
@@ -162,7 +150,7 @@ export default function GroupBehavior(
162
150
 
163
151
  if (is(businessObject, 'bpmn:Group') && !businessObject.categoryValueRef) {
164
152
 
165
- var definitions = getDefinitions(),
153
+ var definitions = bpmnjs.getDefinitions(),
166
154
  categoryValue = createCategoryValue(definitions, bpmnFactory);
167
155
 
168
156
  // link the reference to the Group
@@ -190,7 +178,7 @@ export default function GroupBehavior(
190
178
  categoryValue;
191
179
 
192
180
  if (is(property, 'bpmn:CategoryValue')) {
193
- categoryValue = createCategoryValue(getDefinitions(), bpmnFactory);
181
+ categoryValue = createCategoryValue(bpmnjs.getDefinitions(), bpmnFactory);
194
182
 
195
183
  // return copy of category
196
184
  return moddleCopy.copyElement(property, categoryValue);
@@ -201,7 +189,7 @@ export default function GroupBehavior(
201
189
 
202
190
  GroupBehavior.$inject = [
203
191
  'bpmnFactory',
204
- 'canvas',
192
+ 'bpmnjs',
205
193
  'elementRegistry',
206
194
  'eventBus',
207
195
  'injector',
@@ -48,7 +48,7 @@ export default function ToggleCollapseConnectionBehaviour(
48
48
 
49
49
 
50
50
  function handleConnection(c, incoming) {
51
- if (allChildren.includes(c.source) && allChildren.includes(c.target)) {
51
+ if (allChildren.indexOf(c.source) !== -1 && allChildren.indexOf(c.target) !== -1) {
52
52
  return;
53
53
  }
54
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "9.0.0",
3
+ "version": "9.0.3",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -100,7 +100,7 @@
100
100
  "dependencies": {
101
101
  "bpmn-moddle": "^7.1.2",
102
102
  "css.escape": "^1.5.1",
103
- "diagram-js": "^8.1.1",
103
+ "diagram-js": "^8.2.0",
104
104
  "diagram-js-direct-editing": "^1.6.3",
105
105
  "ids": "^1.0.0",
106
106
  "inherits": "^2.0.4",