@processmaker/modeler 1.43.11 → 1.43.12
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 +97 -85
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +97 -85
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/multiplayer/multiplayer.js +13 -1
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import store from '@/store';
|
|
|
7
7
|
import { getBoundaryEventData } from '@/components/nodes/boundaryEvent/boundaryEventUtils';
|
|
8
8
|
import { InspectorUtils } from './inspector.utils';
|
|
9
9
|
import ColorUtil from '../colorUtil';
|
|
10
|
+
import { debounce } from 'lodash';
|
|
10
11
|
export default class Multiplayer {
|
|
11
12
|
clientIO = null;
|
|
12
13
|
yDoc = null;
|
|
@@ -211,7 +212,7 @@ export default class Multiplayer {
|
|
|
211
212
|
});
|
|
212
213
|
window.ProcessMaker.EventBus.$on('multiplayer-updateSelectedNodes', ( data ) => {
|
|
213
214
|
if (this.modeler.isMultiplayer) {
|
|
214
|
-
this.
|
|
215
|
+
this.debouncedUpdateSelectedNodes(data);
|
|
215
216
|
}
|
|
216
217
|
});
|
|
217
218
|
window.ProcessMaker.EventBus.$on('multiplayer-updateMousePosition', ( data ) => {
|
|
@@ -258,6 +259,17 @@ export default class Multiplayer {
|
|
|
258
259
|
this.modeler.updateClientCursor(client);
|
|
259
260
|
});
|
|
260
261
|
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Debounces the updatedSelectedNodes function to avoid triggering multiple times
|
|
265
|
+
* the update
|
|
266
|
+
*
|
|
267
|
+
* @param {Object} payload
|
|
268
|
+
*/
|
|
269
|
+
debouncedUpdateSelectedNodes = debounce((data) => {
|
|
270
|
+
this.updateSelectedNodes(data);
|
|
271
|
+
}, 400);
|
|
272
|
+
|
|
261
273
|
/**
|
|
262
274
|
* Updates the selected nodes by the user
|
|
263
275
|
* @param {Object} data
|