|
@@ -131,7 +131,22 @@ public class DemoDiagramManager {
|
|
|
*/
|
|
|
public Diagram saveDiagram(Map<String, Object> diagramMap) {
|
|
|
Diagram diagram = manager.fromMapData(diagramMap);
|
|
|
- return dataStrategy.saveDiagram(diagram);
|
|
|
+ dataStrategy.saveDiagram(diagram);
|
|
|
+ manager.buildDiagram(diagram);
|
|
|
+ return diagram;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 重置系统图
|
|
|
+ */
|
|
|
+ public Diagram resetDiagram(String diagramId) {
|
|
|
+ Diagram diagram = dataStrategy.getDiagram(diagramId);
|
|
|
+ manager.resetDiagram(diagram);
|
|
|
+
|
|
|
+ dataStrategy.saveDiagram(diagram);
|
|
|
+ manager.buildDiagram(diagram);
|
|
|
+
|
|
|
+ return diagram;
|
|
|
}
|
|
|
|
|
|
}
|