|
8 | 8 | import com.powsybl.sld.layout.PositionVoltageLevelLayoutFactory;
|
9 | 9 | import com.powsybl.sld.library.ConvergenceComponentLibrary;
|
10 | 10 | import com.powsybl.sld.model.graphs.SubstationGraph;
|
| 11 | +import com.powsybl.sld.svg.SvgParameters; |
11 | 12 | import com.powsybl.sld.svg.styles.BasicStyleProvider;
|
12 | 13 | import com.powsybl.sld.svg.DefaultSVGWriter;
|
13 | 14 | import org.lfenergy.compas.core.commons.ElementConverter;
|
@@ -102,17 +103,14 @@ String createSVG(SubstationGraphBuilder substationGraphBuilder) {
|
102 | 103 | configureLayout(graph, layoutParameters);
|
103 | 104 |
|
104 | 105 | var writer = new StringWriter();
|
105 |
| - var svgWriter = new DefaultSVGWriter(new ConvergenceComponentLibrary(), layoutParameters); |
106 |
| - svgWriter.write("", graph, new SclAutoAlignmentDiagramLabelProvider(graph), new BasicStyleProvider(), writer); |
| 106 | + var svgWriter = new DefaultSVGWriter(new ConvergenceComponentLibrary(), layoutParameters, new SvgParameters()); |
| 107 | + svgWriter.write(graph, new SclAutoAlignmentDiagramLabelProvider(graph), new BasicStyleProvider(), writer); |
107 | 108 | return writer.toString();
|
108 | 109 | }
|
109 | 110 |
|
110 | 111 | private LayoutParameters getLayoutParameters() {
|
111 | 112 | return new LayoutParameters()
|
112 |
| - .setAdaptCellHeightToContent(true) |
113 |
| - .setShowInternalNodes(true) |
114 |
| - .setCssLocation(LayoutParameters.CssLocation.INSERTED_IN_SVG) |
115 |
| - .setShowInternalNodes(true); |
| 113 | + .setAdaptCellHeightToContent(true); |
116 | 114 | }
|
117 | 115 |
|
118 | 116 | private void configureLayout(SubstationGraph graph, LayoutParameters layoutParameters) {
|
|
0 commit comments