@processmaker/modeler 1.39.19 → 1.39.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processmaker/modeler",
3
- "version": "1.39.19",
3
+ "version": "1.39.20",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve --mode development",
6
6
  "test:unit": "vue-cli-service test:unit",
@@ -137,6 +137,20 @@ export default {
137
137
  store.commit('updateNodeProp', { node: this.node, key: 'color', value: color });
138
138
  Vue.set(this.node.definition, 'color', color);
139
139
  this.$emit('save-state');
140
+
141
+ const properties = {
142
+ id: this.node.definition.id,
143
+ properties: {
144
+ color: this.node.definition.color,
145
+ x: this.node.diagram.bounds.x,
146
+ y: this.node.diagram.bounds.y,
147
+ height: this.node.diagram.bounds.height,
148
+ width: this.node.diagram.bounds.width,
149
+ type: this.node.type,
150
+ id: this.node.definition.id,
151
+ },
152
+ };
153
+ window.ProcessMaker.EventBus.$emit('multiplayer-updateNodes', [properties]);
140
154
  },
141
155
  resetNodeColor() {
142
156
  store.commit('updateNodeProp', { node: this.node, key: 'color', value: undefined });
@@ -1136,6 +1136,7 @@ export default {
1136
1136
  type: node.type,
1137
1137
  id: node.definition.id,
1138
1138
  isAddingLaneAbove: true,
1139
+ color: node.color,
1139
1140
  };
1140
1141
  if (node?.pool?.component) {
1141
1142
  defaultData['poolId'] = node.pool.component.id;
@@ -604,6 +604,7 @@ export default {
604
604
  y: shape.model.get('position').y,
605
605
  height: shape.model.get('size').height,
606
606
  width: shape.model.get('size').width,
607
+ color: shape.model.get('color'),
607
608
  },
608
609
  };
609
610
  if (node?.pool?.component) {
@@ -624,6 +625,7 @@ export default {
624
625
  y: model.get('position').y,
625
626
  height: model.get('size').height,
626
627
  width: model.get('size').width,
628
+ color: model.get('color'),
627
629
  },
628
630
  });
629
631
  });
@@ -3,7 +3,7 @@ import * as Y from 'yjs';
3
3
  import { getNodeIdGenerator } from '../NodeIdGenerator';
4
4
  import { getDefaultAnchorPoint } from '@/portsUtils';
5
5
  import Room from './room';
6
-
6
+ import store from '@/store';
7
7
  export default class Multiplayer {
8
8
  clientIO = null;
9
9
  yDoc = null;
@@ -229,6 +229,7 @@ export default class Multiplayer {
229
229
  clientY,
230
230
  control: { type: updatedNode.type },
231
231
  nodeThatWillBeReplaced: node,
232
+ color: node.color,
232
233
  id: updatedNode.id,
233
234
  };
234
235
 
@@ -292,6 +293,10 @@ export default class Multiplayer {
292
293
  data.height,
293
294
  );
294
295
  element.set('position', { x: data.x, y: data.y });
296
+
297
+ const node = this.getNodeById(data.id);
298
+ store.commit('updateNodeProp', { node, key: 'color', value: data.color });
299
+
295
300
  // Trigger a rendering of the element on the paper
296
301
  await paper.findViewByModel(element).update();
297
302
  // validate if the parent pool was updated