@@ -14,11 +14,6 @@ import { CATEGORY_SERVICE, CATEGORY_DATATEST } from "./constants/constants";
14
14
import { addElementFromName , addLinkFromLink } from "./elements/addElement" ;
15
15
import { deleteElementByBoxId , deleteLink } from "./elements/deleteElement" ;
16
16
import { resizeElements } from "./elements/resizeElement" ;
17
- import {
18
- setInputValueInElement ,
19
- setSelectValueInElement ,
20
- closeSelects
21
- } from "./layout/inputs" ;
22
17
import {
23
18
equalObjects ,
24
19
findDifferenceBy ,
@@ -88,11 +83,6 @@ export let app;
88
83
deletedElements ( ) {
89
84
return deletedElements ( this . elementsData ) ;
90
85
} ,
91
- defaultParamsElements ( ) {
92
- return this . elements . map ( ( { boxId, defaultParams } ) => {
93
- return { boxId, defaultParams } ;
94
- } ) ;
95
- } ,
96
86
movedElements ( ) {
97
87
return this . elements . map ( ( { boxId, position } ) => {
98
88
return { boxId, position } ;
@@ -110,16 +100,6 @@ export let app;
110
100
...mapState ( "Keyboard" , [ "ctrl" , "space" ] )
111
101
} ,
112
102
methods : {
113
- /**
114
- * Utility function to clear interactions on the paper
115
- */
116
- clearInteractions ( ) {
117
- // close select manually
118
- closeSelects ( ) ;
119
-
120
- // remove resizer
121
- this . $removeResizer ( ) ;
122
- } ,
123
103
copy ( ) {
124
104
if ( selectedElements . length ) {
125
105
this . $copySelectedElements ( ) ;
@@ -136,6 +116,7 @@ export let app;
136
116
links : this . links ,
137
117
workflowId : this . workflowId
138
118
} ,
119
+ this . $refs . log . messages ,
139
120
installation
140
121
) ; // WARNING: promise
141
122
@@ -242,25 +223,6 @@ export let app;
242
223
}
243
224
}
244
225
} ,
245
- /**
246
- * watch parameters of elements
247
- * on direct changes, nothing changes (mechanic operation)
248
- * only apply changes on undo-redo
249
- */
250
- defaultParamsElements : {
251
- deep : true ,
252
- handler ( newValue , oldValue ) {
253
- const difference = findDifferenceBy (
254
- newValue ,
255
- oldValue ,
256
- "defaultParams"
257
- ) ;
258
- for ( const box of difference ) {
259
- setSelectValueInElement ( box ) ;
260
- setInputValueInElement ( box ) ;
261
- }
262
- }
263
- } ,
264
226
/**
265
227
* watch moved elements
266
228
* on direct move operation, nothing changes (mechanic operation)
@@ -344,16 +306,17 @@ export let app;
344
306
Paper . changeScale ( nextScale , currentScale ) ;
345
307
}
346
308
} ,
347
- mounted ( ) {
309
+ async mounted ( ) {
348
310
Paper . initPaper ( this , Graph . graph ) ;
349
311
350
- initKeyboardEvents ( ) ; // WARNiNG promise
312
+ initKeyboardEvents ( this ) ; // WARNiNG promise
351
313
352
314
// retrieve workflow id
353
315
const id = DivaServices . getUrlParameters ( ) . id ;
354
316
if ( ! isNaN ( id ) ) {
355
317
this . workflowId = id ;
356
- openWorkflow ( id ) ;
318
+ const workflow = await openWorkflow ( id ) ;
319
+ this . $openWorkflow ( workflow ) ;
357
320
} else {
358
321
throw "Error with id " + id ;
359
322
}
0 commit comments