@processmaker/modeler 1.28.0 → 1.29.0

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/src/store.js CHANGED
@@ -71,6 +71,9 @@ export default new Vuex.Store({
71
71
  state.rootElements = rootElements;
72
72
  },
73
73
  updateNodeBounds(state, { node, bounds }) {
74
+ if (!bounds) {
75
+ return;
76
+ }
74
77
  Object.entries(bounds).forEach(([key, val]) => {
75
78
  if (key === '$type') {
76
79
  return;
@@ -8,7 +8,6 @@ export default new Vuex.Store({
8
8
  stack: [],
9
9
  position: null,
10
10
  disabled: false,
11
- saved: false,
12
11
  isVersionsInstalled: false,
13
12
  isDraft: false,
14
13
  isLoading: false,
@@ -23,9 +22,6 @@ export default new Vuex.Store({
23
22
  currentState(state) {
24
23
  return state.stack[state.position];
25
24
  },
26
- saved(state) {
27
- return state.saved;
28
- },
29
25
  isVersionsInstalled(state) {
30
26
  return state.isVersionsInstalled;
31
27
  },
@@ -53,9 +49,6 @@ export default new Vuex.Store({
53
49
  enableSavingState(state) {
54
50
  state.disabled = false;
55
51
  },
56
- savedState(state, payload) {
57
- state.saved = payload;
58
- },
59
52
  isVersionsInstalled(state, payload) {
60
53
  state.isVersionsInstalled = payload;
61
54
  },
@@ -89,22 +82,14 @@ export default new Vuex.Store({
89
82
 
90
83
  commit('setPosition', state.position + 1);
91
84
  },
92
- saved({ commit }) {
93
- commit('savedState', true);
94
-
95
- // Automatically remove the notification after 2 seconds.
96
- setTimeout(() => {
97
- commit('savedState', false);
98
- }, 2000);
99
- },
100
85
  enableVersions({ commit }) {
101
86
  commit('isVersionsInstalled', true);
102
87
  },
103
- setVersionIndicator({ commit }, newState) {
104
- commit('isDraft', newState);
88
+ setVersionIndicator({ commit }, value) {
89
+ commit('isDraft', value);
105
90
  },
106
- setLoadingState({ commit }, newState) {
107
- commit('isLoading', newState);
91
+ setLoadingState({ commit }, value) {
92
+ commit('isLoading', value);
108
93
  },
109
94
  },
110
95
  });