@processmaker/modeler 1.24.4 → 1.25.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/dist/modeler.common.js +1840 -594
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +1840 -594
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +3 -3
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/controls/controls.scss +8 -3
- package/src/components/crown/crownConfig/crownConfig.scss +1 -1
- package/src/components/crown/crownConfig/crownConfig.vue +5 -1
- package/src/components/crown/crownMultiselect/crownMultiselect.vue +140 -0
- package/src/components/hotkeys/main.js +62 -0
- package/src/components/hotkeys/zoomInOut.js +29 -0
- package/src/components/inspectors/InspectorPanel.vue +1 -0
- package/src/components/inspectors/inspector.scss +1 -1
- package/src/components/modeler/Modeler.vue +173 -46
- package/src/components/modeler/Selection.vue +705 -0
- package/src/components/modeler/modeler.scss +0 -1
- package/src/components/nodes/boundaryEvent/boundaryEvent.vue +3 -0
- package/src/components/nodes/pool/poolEventHandlers.js +1 -0
- package/src/components/paperManager.js +2 -0
- package/src/components/toolbar/ToolBar.vue +8 -11
- package/src/components/toolbar/toolbar.scss +1 -1
- package/src/mixins/highlightConfig.js +2 -0
- package/src/mixins/linkConfig.js +3 -0
- package/src/store.js +12 -1
- /package/src/components/{modeler → hotkeys}/moveWithArrowKeys.js +0 -0
|
@@ -143,6 +143,7 @@ export default {
|
|
|
143
143
|
resetToInitialPosition() {
|
|
144
144
|
this.shape.position(this.validPosition.x, this.validPosition.y);
|
|
145
145
|
store.commit('allowSavingElementPosition');
|
|
146
|
+
this.$emit('shape-resize');
|
|
146
147
|
},
|
|
147
148
|
moveBoundaryEventIfOverTask() {
|
|
148
149
|
const task = this.getTaskUnderShape();
|
|
@@ -154,11 +155,13 @@ export default {
|
|
|
154
155
|
|
|
155
156
|
this.attachBoundaryEventToTask(task);
|
|
156
157
|
this.updateShapePosition(task);
|
|
158
|
+
this.$emit('shape-resize');
|
|
157
159
|
},
|
|
158
160
|
resetInvalidTarget() {
|
|
159
161
|
if (this.invalidTargetElement) {
|
|
160
162
|
resetShapeColor(this.invalidTargetElement);
|
|
161
163
|
this.invalidTargetElement = null;
|
|
164
|
+
this.$emit('shape-resize');
|
|
162
165
|
}
|
|
163
166
|
},
|
|
164
167
|
attachToValidTarget(cellView) {
|
|
@@ -21,6 +21,8 @@ export default class PaperManager {
|
|
|
21
21
|
sorting: 'sorting-approximate',
|
|
22
22
|
gridSize: PaperManager.gridSize,
|
|
23
23
|
drawGrid: true,
|
|
24
|
+
snapLinks: false, // disable snapping of links
|
|
25
|
+
snapElements: false, // disable snapping of elements
|
|
24
26
|
clickThreshold: 10,
|
|
25
27
|
perpendicularLinks: true,
|
|
26
28
|
interactive: interactiveFunc,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<div class="btn-group btn-group-sm mr-2" role="group" aria-label="Zoom controls">
|
|
35
35
|
<b-button
|
|
36
36
|
class="btn btn-sm btn-secondary"
|
|
37
|
-
@click="scale
|
|
37
|
+
@click="paperManager.scale = paperManager.scale.sx + scaleStep"
|
|
38
38
|
data-test="zoom-in"
|
|
39
39
|
v-b-tooltip.hover
|
|
40
40
|
:title="$t('Zoom In')"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</b-button>
|
|
44
44
|
<b-button
|
|
45
45
|
class="btn btn-sm btn-secondary"
|
|
46
|
-
@click="scale = Math.max(minimumScale, scale -= scaleStep)"
|
|
46
|
+
@click="paperManager.scale = Math.max(minimumScale, paperManager.scale.sx -= scaleStep)"
|
|
47
47
|
data-test="zoom-out"
|
|
48
48
|
v-b-tooltip.hover
|
|
49
49
|
:title="$t('Zoom Out')"
|
|
@@ -51,16 +51,17 @@
|
|
|
51
51
|
<font-awesome-icon :icon="minusIcon" />
|
|
52
52
|
</b-button>
|
|
53
53
|
<b-button
|
|
54
|
+
v-if="paperManager"
|
|
54
55
|
class="btn btn-sm btn-secondary"
|
|
55
|
-
@click="scale = initialScale"
|
|
56
|
-
:disabled="scale === initialScale"
|
|
56
|
+
@click="paperManager.scale = initialScale"
|
|
57
|
+
:disabled="paperManager.scale.sx === initialScale"
|
|
57
58
|
data-test="zoom-reset"
|
|
58
59
|
v-b-tooltip.hover
|
|
59
60
|
:title="$t('Reset to initial scale')"
|
|
60
61
|
>
|
|
61
62
|
{{ $t('Reset') }}
|
|
62
63
|
</b-button>
|
|
63
|
-
<span class="btn btn-sm btn-secondary scale-value">{{ Math.round(scale*100) }}%</span>
|
|
64
|
+
<span v-if="paperManager" class="btn btn-sm btn-secondary scale-value">{{ Math.round(paperManager.scale.sx*100) }}%</span>
|
|
64
65
|
</div>
|
|
65
66
|
|
|
66
67
|
<div class="btn-group btn-group-sm mr-2" role="group" aria-label="Additional controls">
|
|
@@ -121,12 +122,6 @@ export default {
|
|
|
121
122
|
panelsCompressed: Boolean,
|
|
122
123
|
},
|
|
123
124
|
watch: {
|
|
124
|
-
scale(scale) {
|
|
125
|
-
this.paperManager.scale = scale;
|
|
126
|
-
if (scale === this.initialScale) {
|
|
127
|
-
this.$root.$emit('bv::hide::tooltip');
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
125
|
miniMapOpen(isOpen) {
|
|
131
126
|
this.$emit('toggle-mini-map-open', isOpen);
|
|
132
127
|
},
|
|
@@ -168,6 +163,7 @@ export default {
|
|
|
168
163
|
},
|
|
169
164
|
methods: {
|
|
170
165
|
undo() {
|
|
166
|
+
this.$emit('clearSelection');
|
|
171
167
|
if (this.isRendering) {
|
|
172
168
|
return;
|
|
173
169
|
}
|
|
@@ -177,6 +173,7 @@ export default {
|
|
|
177
173
|
.then(() => window.ProcessMaker.EventBus.$emit('modeler-change'));
|
|
178
174
|
},
|
|
179
175
|
redo() {
|
|
176
|
+
this.$emit('clearSelection');
|
|
180
177
|
if (this.isRendering) {
|
|
181
178
|
return;
|
|
182
179
|
}
|
|
@@ -21,6 +21,7 @@ const defaultHighlighter = {
|
|
|
21
21
|
attrs: {
|
|
22
22
|
stroke: '#5096db',
|
|
23
23
|
'stroke-width': 3,
|
|
24
|
+
'data-cy': 'selected',
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
},
|
|
@@ -96,6 +97,7 @@ export default {
|
|
|
96
97
|
this.setShapeHighlight();
|
|
97
98
|
this.shape.on('change:size', () => {
|
|
98
99
|
this.paperManager.awaitScheduledUpdates().then(this.setShapeHighlight);
|
|
100
|
+
this.$emit('shape-resize', this.shape);
|
|
99
101
|
});
|
|
100
102
|
});
|
|
101
103
|
});
|
package/src/mixins/linkConfig.js
CHANGED
package/src/store.js
CHANGED
|
@@ -94,7 +94,18 @@ export default new Vuex.Store({
|
|
|
94
94
|
state.highlightedNodes = node ? [node] : [];
|
|
95
95
|
},
|
|
96
96
|
addToHighlightedNodes(state, nodes) {
|
|
97
|
-
|
|
97
|
+
const highlightedNodes = uniq([...state.highlightedNodes, ...nodes]);
|
|
98
|
+
const selectedPoolsIds = highlightedNodes
|
|
99
|
+
.filter(node => node.type === 'processmaker-modeler-pool')
|
|
100
|
+
.map(node => node.id);
|
|
101
|
+
state.highlightedNodes = highlightedNodes
|
|
102
|
+
// remove from selection the selected child nodes in the pool
|
|
103
|
+
.filter(node => {
|
|
104
|
+
if (node.pool && node.pool.component.node.id) {
|
|
105
|
+
return !selectedPoolsIds.includes(node.pool.component.node.id);
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
});
|
|
98
109
|
},
|
|
99
110
|
addNode(state, node) {
|
|
100
111
|
/* Add an unchanging ID that Vue can use to track the component
|
|
File without changes
|