Closed 7174Andy closed 2 months ago
The modifications enhance the create_new_instance
and set_visible_nodes
functions by introducing init_method
and location
parameters. This allows for precise adjustments of node positions based on a specified reference point. The show_contextual_menu
method in the VideoWidget
class was also updated to utilize these parameters, improving the accuracy and flexibility of placements during user interactions.
File | Change Summary |
---|---|
sleap/gui/commands.py |
Added init_method and location parameters to create_new_instance and set_visible_nodes functions for improved control over node positioning. |
sleap/gui/widgets/video.py |
Updated show_contextual_menu method to include location in calls to newInstance . |
sequenceDiagram
participant User
participant VideoWidget
participant ContextMenu
participant Command
User ->> VideoWidget: Right-click for context menu
VideoWidget ->> ContextMenu: Display options
ContextMenu ->> User: Show "Default" option
User ->> ContextMenu: Select "Default"
ContextMenu ->> VideoWidget: Trigger newInstance(init_method="best", location=scene_pos)
VideoWidget ->> Command: create_new_instance(location=scene_pos)
Command ->> Command: Adjust node positions based on location
In fields of code, nodes find their place,
Guided by points in virtual space.
Withlocation
set, they now align,
A dance of logic, pure design.
Context menus lead the way,
To precise positions, come what may. 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 70.58824%
with 10 lines
in your changes missing coverage. Please review.
Project coverage is 74.34%. Comparing base (
7ed1229
) to head (6d7943a
). Report is 24 commits behind head on develop.
Files | Patch % | Lines |
---|---|---|
sleap/gui/commands.py | 72.72% | 9 Missing :warning: |
sleap/gui/widgets/video.py | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Types of changes
Does this address any currently open issues?
This PR is an expansion of PR #1816.
Outside contributors checklist
Thank you for contributing to SLEAP!
:heart:
Summary by CodeRabbit
location
for node positions, enhancing control over instance initialization and visibility settings.location
.