Skip to content

Commit c35784c

Browse files
authored
Merge pull request #39 from sakazuki/issue-37
fix #37 #38
2 parents b0256bb + afa7491 commit c35784c

File tree

14 files changed

+23
-20
lines changed

14 files changed

+23
-20
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1. Select Save Option (ex. Decide Later...)
1515
1. Select Menu [Extras]-[Plugins]
1616
1. Click [Add]
17-
1. Input https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.6.1/dist/aws-step-functions.js
17+
1. Input https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.6.2/dist/aws-step-functions.js
1818
1. [Apply]
1919
1. Reload the page
2020

@@ -84,6 +84,7 @@ node carlo.js
8484
```
8585

8686
## Version history
87+
- https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.6.2/dist/aws-step-functions.js
8788
- https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.6.1/dist/aws-step-functions.js
8889
- https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.6.0/dist/aws-step-functions.js
8990
- https://cdn.jsdelivr.net/gh/sakazuki/step-functions-draw.io@0.5.1/dist/aws-step-functions.js

dist/aws-step-functions.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/states/awsconfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ AWSconfig.prototype.create = function () {
1818
return createAWSconfig(this);
1919
};
2020
AWSconfig.prototype.handler = awssfStateHandler;
21-
registCodec(AWSconfig);
21+
registCodec('AWSconfig', AWSconfig);

src/states/choice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ChoiceState.prototype.expJSON = function (cell, cells) {
5454
}
5555
return data;
5656
};
57-
registCodec(ChoiceState);
57+
registCodec('ChoiceState', ChoiceState);
5858
var ChoiceStateHandler = function (state) {
5959
this.custom = function () {
6060
this.domNode.appendChild(ChoiceEdge.prototype.createHandlerImage.apply(this, arguments));

src/states/edge.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ StartAtEdge.prototype.expJSON = function (cell, cells) {
2626
}
2727
};
2828
StartAtEdge.prototype.handler = awssfEdgeHandler;
29-
registCodec(StartAtEdge);
29+
registCodec('StartAtEdge', StartAtEdge);
3030

3131

3232
const NextEdge = function () {};
@@ -58,7 +58,7 @@ NextEdge.prototype.createHandlerImage = function () {
5858
return img;
5959
};
6060
NextEdge.prototype.handler = awssfEdgeHandler;
61-
registCodec(NextEdge);
61+
registCodec('NextEdge', NextEdge);
6262

6363

6464
const RetryEdge = function () {};
@@ -117,7 +117,7 @@ RetryEdge.prototype.createHandlerImage = function () {
117117
return img;
118118
};
119119
RetryEdge.prototype.handler = awssfEdgeHandler;
120-
registCodec(RetryEdge);
120+
registCodec('RetryEdge', RetryEdge);
121121

122122
const CatchEdge = function () {};
123123
CatchEdge.prototype.type = 'Catch';
@@ -163,7 +163,7 @@ CatchEdge.prototype.createHandlerImage = function () {
163163
return img;
164164
};
165165
CatchEdge.prototype.handler = awssfEdgeHandler;
166-
registCodec(CatchEdge);
166+
registCodec('CatchEdge', CatchEdge);
167167

168168
const ChoiceEdge = function () {};
169169
ChoiceEdge.prototype.type = 'Choice';
@@ -213,7 +213,7 @@ ChoiceEdge.prototype.createHandlerImage = function () {
213213
return img;
214214
};
215215
ChoiceEdge.prototype.handler = awssfEdgeHandler;
216-
registCodec(ChoiceEdge);
216+
registCodec('ChoiceEdge', ChoiceEdge);
217217

218218
const DefaultEdge = function DefaultEdge () {};
219219
DefaultEdge.prototype.type = 'Default';
@@ -244,6 +244,6 @@ DefaultEdge.prototype.createHandlerImage = function () {
244244
return img;
245245
};
246246
DefaultEdge.prototype.handler = awssfEdgeHandler;
247-
registCodec(DefaultEdge);
247+
registCodec('DefaultEdge', DefaultEdge);
248248

249249
export { StartAtEdge, NextEdge, RetryEdge, CatchEdge, ChoiceEdge, DefaultEdge };

src/states/fail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ FailState.prototype.expJSON = function (cell, cells) {
3939
data[label].Comment = cell.getAttribute("comment");
4040
return data;
4141
};
42-
registCodec(FailState);
42+
registCodec('FailState', FailState);
4343
FailState.prototype.handler = awssfStateHandler;

src/states/helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export function init (editorUi) {
66
graph = editorUi.editor ? editorUi.editor.graph : editorUi.graph;
77
}
88

9-
export function registCodec (func) {
9+
export function registCodec (name, func) {
1010
var codec = new mxObjectCodec(new func());
1111
codec.encode = function (enc, obj) {
1212
try{
13-
var data = enc.document.createElement(func.name);
13+
var data = enc.document.createElement(name);
1414
}catch(e) {
1515
console.log("encode error", e);
1616
}

src/states/map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ MapState.prototype.expJSON = function (cell, cells) {
126126

127127
};
128128

129-
registCodec(MapState);
129+
registCodec('MapState', MapState);
130130

131131
var MapStateHandler = function (state) {
132132
this.custom = function () {

src/states/parallel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ ParallelState.prototype.expJSON = function (cell, cells) {
130130
return data;
131131

132132
};
133-
registCodec(ParallelState);
133+
registCodec('ParallelState', ParallelState);
134134
var ParallelStateHandler = function (state) {
135135
this.custom = function () {
136136
this.domNode.appendChild(NextEdge.prototype.createHandlerImage.apply(this, arguments));

src/states/pass.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ PassState.prototype.expJSON = function (cell, cells) {
6060
}
6161
return data;
6262
};
63-
registCodec(PassState);
63+
registCodec('PassState', PassState);
6464
var PassStateHandler = function (state) {
6565
this.custom = function () {
6666
this.domNode.appendChild(NextEdge.prototype.createHandlerImage.apply(this, arguments));

0 commit comments

Comments
 (0)