Skip to content

Commit

Permalink
fixes docs
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Biasuzzi <christian.biasuzzi@soft.it>
  • Loading branch information
CBiasuzzi committed Nov 8, 2024
1 parent 3d5cb68 commit d2be5d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions docs/user_guide/nad_widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ display_nad(svg, invalid_lf: bool = False, enable_callbacks: bool = False, grayo

- svg: the input SVG, as str or class providing an svg and metadata representation
- invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a shift+click on a node) and moving nodes.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a shift+click on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
- grayout: if True, changes the diagram elements' color to gray.


Expand All @@ -48,7 +48,7 @@ update_nad(nadwidget, svg, invalid_lf: bool = False, enable_callbacks: bool = Fa
- nadwidget: the existing widget to update
- svg: the input NAD's SVG
- invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a SHIFT+CLICK on a node) and moving nodes.
- enable_callbacks: if True, enable the callbacks for selecting nodes (through a SHIFT+CLICK on a node) and moving nodes. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
- grayout: if True, changes the diagram elements' color to gray.

## Customize widget's interactions
Expand All @@ -64,6 +64,8 @@ Use these widget's methods to register a callback on a specific event:

The [network explorer widget](/user_guide/network_explorer.md) demonstrates the approach.

Please note that the callbacks works with versions of PyPowSyBl equal or greater than v1.8.1.

Example: the code below activates a callback when a node is selected (through SHIFT+CLICK) in the widget (it prints the selected node's ID to the log).

```python
Expand Down
4 changes: 3 additions & 1 deletion docs/user_guide/network_explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The selected voltage level is the displayed NAD's center.

A 'depth' slider controls the size of the sub network.

Selecting a VL's node (through SHIFT+CLICK) will activate the SLD panel on the corresponding voltage level.
Selecting a VL's node (through SHIFT+CLICK) will activate the SLD panel on the corresponding voltage level. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.

## Single Line tab

Expand All @@ -38,6 +38,8 @@ Switches can also be clicked, causing their status in the network to change; Ple
![network-explorer MAP tab](/_static/img/network_explorer_3.png)

The 'Network map' displays the network's substations and lines on a map. The map is empty if the network does not contain geo data.
Please note that substation's and line's IIDM extensions are only available in PyPowSyBl starting from v1.5.0; With earlier versions of PyPowSyBl the map would be empty, too.

By clicking on a substation, a list with the substation's voltage levels appears.

![network-explorer MAP tab VLs list](/_static/img/network_explorer_4.png)
Expand Down
4 changes: 2 additions & 2 deletions src/pypowsybl_jupyter/nadwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def display_nad(svg, invalid_lf: bool = False, enable_callbacks: bool = False, g
Args:
svg: the input SVG, as str or class providing an svg and metadata representation
invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
enable_callbacks: if True, enable the callbacks for moving and selecting nodes in the diagram.
enable_callbacks: if True, enable the callbacks for moving and selecting nodes in the diagram. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
grayout: if True, changes the diagram elements' color to gray.
Returns:
Expand All @@ -96,7 +96,7 @@ def update_nad(nadwidget, svg, invalid_lf: bool = False, enable_callbacks: bool
nadwidget: the existing widget to update
svg: the input NAD's SVG
invalid_lf: when True the opacity style for some of the displayed info's (e.g., active and reactive power) is decreased, making them barely visible in the diagram.
enable_callbacks: if True, enable the callbacks for moving and selecting nodes in the diagram.
enable_callbacks: if True, enable the callbacks for moving and selecting nodes in the diagram. Please note that this feature is working with versions of PyPowSyBl equal or greater than v1.8.1.
grayout: if True, changes the diagram elements' color to gray.
Examples:
Expand Down

0 comments on commit d2be5d9

Please sign in to comment.