Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make simple voltage level nodes movable in network area diagram #59

Merged
merged 10 commits into from
May 16, 2024
4 changes: 3 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
<div class="flex-container">
<div id="root"></div>
<div class="break"></div>
<div id="svg-container"></div>
<div id="svg-container-nad"></div>
<div id="svg-container-nad-pst-hvdc"></div>
<div class="break"></div>
<div id="svg-container-sld"></div>
<div id="svg-container-sld-with-callbacks"></div>
<div class="break"></div>
Expand Down
25 changes: 22 additions & 3 deletions demo/src/diagram-viewers/add-diagrams.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import NadSvgExample from './data/nad-example.svg';
import NadSvgExample from './data/nad-eurostag-tutorial-example1.svg';
import NadSvgPstHvdcExample from './data/nad-four-substations.svg';
import SldSvgExample from './data/sld-example.svg';
import SldSvgExampleMeta from './data/sld-example-meta.json';
import SldSvgSubExample from './data/sld-sub-example.svg';
Expand All @@ -19,7 +20,7 @@ export const addNadToDemo = () => {
.then((response) => response.text())
.then((svgContent) => {
new NetworkAreaDiagramViewer(
document.getElementById('svg-container'),
document.getElementById('svg-container-nad'),
svgContent,
500,
600,
Expand All @@ -28,7 +29,25 @@ export const addNadToDemo = () => {
);

document
.getElementById('svg-container')
.getElementById('svg-container-nad')
.getElementsByTagName('svg')[0]
.setAttribute('style', 'border:2px; border-style:solid;');
});

fetch(NadSvgPstHvdcExample)
.then((response) => response.text())
.then((svgContent) => {
new NetworkAreaDiagramViewer(
document.getElementById('svg-container-nad-pst-hvdc'),
svgContent,
500,
600,
1000,
1200
);

document
.getElementById('svg-container-nad-pst-hvdc')
.getElementsByTagName('svg')[0]
.setAttribute('style', 'border:2px; border-style:solid;');
});
Expand Down
324 changes: 324 additions & 0 deletions demo/src/diagram-viewers/data/nad-eurostag-tutorial-example1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading