@processmaker/modeler 1.39.26 → 1.39.28
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.
- package/dist/modeler.common.js +53 -40
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +53 -40
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +2 -2
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/inspectors/preview_panel.scss +3 -1
- package/src/components/modeler/Modeler.vue +1 -1
- package/src/multiplayer/multiplayer.js +20 -13
- package/src/setup/initialLoad.js +11 -8
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$inspector-column-max-width: 400px;
|
|
2
|
-
$inspector-column-min-width:
|
|
2
|
+
$inspector-column-min-width: 200px;
|
|
3
3
|
|
|
4
4
|
#preview_panel::after {
|
|
5
5
|
display: flex;
|
|
@@ -12,10 +12,12 @@ $inspector-column-min-width: 400px;
|
|
|
12
12
|
|
|
13
13
|
.preview-column {
|
|
14
14
|
max-width: $inspector-column-max-width;
|
|
15
|
+
min-width: $inspector-column-min-width;
|
|
15
16
|
resize: both;
|
|
16
17
|
overflow:auto;
|
|
17
18
|
background-color: #F5F5F5;
|
|
18
19
|
border-left: 8px solid #EBEEF2;
|
|
20
|
+
z-index: 2;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
.paneiframe {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
:parent-height="parentHeight"
|
|
85
85
|
:canvas-drag-position="canvasDragPosition"
|
|
86
86
|
@shape-resize="shapeResize(false)"
|
|
87
|
-
@toggleInspector="handleToggleInspector"
|
|
87
|
+
@toggleInspector="[handleToggleInspector($event), setInspectorButtonPosition($event)]"
|
|
88
88
|
/>
|
|
89
89
|
|
|
90
90
|
<component
|
|
@@ -54,9 +54,9 @@ export default class Multiplayer {
|
|
|
54
54
|
top: 90,
|
|
55
55
|
left: 80,
|
|
56
56
|
};
|
|
57
|
-
|
|
58
57
|
this.modeler.addPlayer(newPlayer);
|
|
59
58
|
});
|
|
59
|
+
this.syncLocalNodes(this.clientIO.id);
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
|
|
@@ -72,18 +72,7 @@ export default class Multiplayer {
|
|
|
72
72
|
|
|
73
73
|
// Check if the current client is the first client
|
|
74
74
|
if (firstClient.id === this.clientIO.id) {
|
|
75
|
-
|
|
76
|
-
const nodes = this.modeler.nodes.map((node) => this.modeler.multiplayerHook(node, false, true));
|
|
77
|
-
|
|
78
|
-
nodes.forEach((node) => {
|
|
79
|
-
const yMapNested = new Y.Map();
|
|
80
|
-
this.doTransact(yMapNested, node);
|
|
81
|
-
this.yArray.push([yMapNested]);
|
|
82
|
-
// Encode the state as an update and send it to the server
|
|
83
|
-
const stateUpdate = Y.encodeStateAsUpdate(this.yDoc);
|
|
84
|
-
// Send the update to the web socket server
|
|
85
|
-
this.clientIO.emit('createElement', { updateDoc: stateUpdate, clientId });
|
|
86
|
-
});
|
|
75
|
+
this.syncLocalNodes(clientId);
|
|
87
76
|
}
|
|
88
77
|
});
|
|
89
78
|
|
|
@@ -180,6 +169,24 @@ export default class Multiplayer {
|
|
|
180
169
|
}
|
|
181
170
|
});
|
|
182
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Sync the modeler nodes with the microservice
|
|
174
|
+
* @param {String} clientId
|
|
175
|
+
*/
|
|
176
|
+
syncLocalNodes(clientId){
|
|
177
|
+
// Get the process definition
|
|
178
|
+
const nodes = this.modeler.nodes.map((node) => this.modeler.multiplayerHook(node, false, true));
|
|
179
|
+
|
|
180
|
+
nodes.forEach((node) => {
|
|
181
|
+
const yMapNested = new Y.Map();
|
|
182
|
+
this.doTransact(yMapNested, node);
|
|
183
|
+
this.yArray.push([yMapNested]);
|
|
184
|
+
// Encode the state as an update and send it to the server
|
|
185
|
+
const stateUpdate = Y.encodeStateAsUpdate(this.yDoc);
|
|
186
|
+
// Send the update to the web socket server
|
|
187
|
+
this.clientIO.emit('createElement', { updateDoc: stateUpdate, clientId });
|
|
188
|
+
});
|
|
189
|
+
}
|
|
183
190
|
addNode(data) {
|
|
184
191
|
// Add the new element to the shared array
|
|
185
192
|
const yMapNested = new Y.Map();
|
package/src/setup/initialLoad.js
CHANGED
|
@@ -27,18 +27,21 @@ window.ProcessMaker.EventBus.$on(
|
|
|
27
27
|
'modeler-init',
|
|
28
28
|
(event) => {
|
|
29
29
|
event.registerPreview({
|
|
30
|
-
url:'/designer/screens/preview',
|
|
30
|
+
url: '/designer/screens/preview',
|
|
31
31
|
receivingParams: ['screenRef'],
|
|
32
|
-
matcher: (nodeData) =>
|
|
33
|
-
return nodeData?.$type === 'bpmn:Task';
|
|
34
|
-
},
|
|
32
|
+
matcher: (nodeData) => nodeData?.$type === 'bpmn:Task',
|
|
35
33
|
});
|
|
34
|
+
|
|
36
35
|
event.registerPreview({
|
|
37
|
-
url:'/designer/scripts/preview',
|
|
36
|
+
url: '/designer/scripts/preview',
|
|
38
37
|
receivingParams: ['scriptRef'],
|
|
39
|
-
matcher: (nodeData) =>
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
matcher: (nodeData) => nodeData?.$type === 'bpmn:ScriptTask',
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
event.registerPreview({
|
|
42
|
+
url: '/designer/scripts/preview',
|
|
43
|
+
receivingParams: ['screenRef'],
|
|
44
|
+
matcher: (nodeData) => nodeData?.$type === 'bpmn:ManualTask',
|
|
42
45
|
});
|
|
43
46
|
});
|
|
44
47
|
|