@@ -29,6 +29,7 @@ Features:
29
29
* [ 📐 Simple Flow] ( https://nocode-js.github.io/sequential-workflow-designer/examples/simple-flow.html )
30
30
* [ 🌻 Rendering Test] ( https://nocode-js.github.io/sequential-workflow-designer/examples/rendering-test.html )
31
31
* [ 🚄 Stress Test] ( https://nocode-js.github.io/sequential-workflow-designer/examples/stress-test.html )
32
+ * [ 🚪 Editing Restrictions] ( https://nocode-js.github.io/sequential-workflow-designer/examples/editing-restrictions.html )
32
33
33
34
Pro:
34
35
@@ -75,10 +76,10 @@ Add the below code to your head section in HTML document.
75
76
``` html
76
77
<head >
77
78
...
78
- <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.6 .0/css/designer.css" rel =" stylesheet" >
79
- <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.6 .0/css/designer-light.css" rel =" stylesheet" >
80
- <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.6 .0/css/designer-dark.css" rel =" stylesheet" >
81
- <script src =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.6 .0/dist/index.umd.js" ></script >
79
+ <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7 .0/css/designer.css" rel =" stylesheet" >
80
+ <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7 .0/css/designer-light.css" rel =" stylesheet" >
81
+ <link href =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7 .0/css/designer-dark.css" rel =" stylesheet" >
82
+ <script src =" https://cdn.jsdelivr.net/npm/sequential-workflow-designer@0.7 .0/dist/index.umd.js" ></script >
82
83
```
83
84
84
85
Call the designer by:
@@ -131,12 +132,20 @@ const configuration = {
131
132
},
132
133
133
134
steps: {
135
+ // all properties in this section are optional
136
+
134
137
iconUrlProvider : (componentType , type ) => {
135
138
return ` icon-${componentType }-${type }.svg ` ;
136
139
},
137
- validator : (step ) => {
140
+ validator : (step , sourceSequence ) => {
138
141
return / ^ [a-z ] + $ / .test (step .name );
139
142
},
143
+ isDraggable : (step , parentSequence ) => {
144
+ return step .name !== ' y' ;
145
+ },
146
+ isDeletable : (step , parentSequence ) => {
147
+ return step .properties [' isDeletable' ];
148
+ },
140
149
canInsertStep : (step , targetSequence , targetIndex ) => {
141
150
return targetSequence .length < 5 ;
142
151
},
0 commit comments