Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Arash1381-y committed Oct 20, 2023
1 parent 5560053 commit f9e78f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fsm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1437,6 +1437,7 @@ function restore(obj) {
link.json_model = JSON.parse(backupLink.json_model)
else
backupLink.json_model = {}

} else if (backupLink.type === 'StartLink') {
link = new StartLink(nodes[backupLink.node]);
link.deltaX = backupLink.deltaX ?? 0;
Expand All @@ -1450,11 +1451,14 @@ function restore(obj) {
link.json_model = JSON.parse(backupLink.json_model)
else
backupLink.json_model = {}

}

if (link != null) {
console.log(backupLink)
link.linkId = backupLink.linkId
link.text = backupLink.text ?? "";
link.fontSize = backupLink.fontSize
links.push(link);
}

Expand Down Expand Up @@ -1499,6 +1503,7 @@ function saveBackup() {
'anchorAngle': link.anchorAngle,
'json_model': JSON.stringify(link.json_model),
'linkId': link.linkId,
'fontSize': link.fontSize,
};
} else if (link instanceof StartLink) {
backupLink = {
Expand All @@ -1515,6 +1520,7 @@ function saveBackup() {
'nodeA': nodes.indexOf(link.nodeA),
'nodeB': nodes.indexOf(link.nodeB),
'json_model': JSON.stringify(link.json_model),
'fontSize': link.fontSize,
'text': link.text,
'lineAngleAdjust': link.lineAngleAdjust,
'parallelPart': link.parallelPart,
Expand Down

0 comments on commit f9e78f9

Please sign in to comment.