diff --git a/docs/user_guide/nad_widget.md b/docs/user_guide/nad_widget.md index 902cdca..54ee89f 100644 --- a/docs/user_guide/nad_widget.md +++ b/docs/user_guide/nad_widget.md @@ -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. @@ -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 @@ -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 diff --git a/docs/user_guide/network_explorer.md b/docs/user_guide/network_explorer.md index 8feec1d..245fccd 100644 --- a/docs/user_guide/network_explorer.md +++ b/docs/user_guide/network_explorer.md @@ -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 @@ -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) diff --git a/src/pypowsybl_jupyter/nadwidget.py b/src/pypowsybl_jupyter/nadwidget.py index 7bc95ba..c9b71a7 100644 --- a/src/pypowsybl_jupyter/nadwidget.py +++ b/src/pypowsybl_jupyter/nadwidget.py @@ -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: @@ -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: