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

locate substation with zoom #119

Merged
merged 5 commits into from
Nov 8, 2024
Merged

Conversation

jamal-khey
Copy link
Contributor

@jamal-khey jamal-khey commented Nov 5, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

What is the current behavior?

centering the view on a substation did not trigger any zoom action on the substation. The camera may have remained at a default zoom level , making it difficult for users to focus on the specific substation they were trying to locate i a dense network

What is the new behavior (if this is a feature change)?
now when the location locating a substation, the camera automatically zooms in on the substation. This provides immediate visual feedback and helps users quickly identify the substation's location on the map.

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

What changes might users need to make in their application due to this PR? (migration steps)
a new optional props is available locateSubStationZoomLevel wich allow to define zoom level.
if not defined this props has a default value to 12

@jamal-khey jamal-khey force-pushed the jamalkhey/locate-substation-with-zoom branch from c614a9d to d23227c Compare November 5, 2024 13:54
Signed-off-by: jamal-khey <myjamal89@gmail.com>
@jamal-khey jamal-khey force-pushed the jamalkhey/locate-substation-with-zoom branch from d23227c to dc5f44b Compare November 5, 2024 14:08
@jamal-khey jamal-khey self-assigned this Nov 5, 2024
@souissimai souissimai self-requested a review November 5, 2024 15:53
@souissimai
Copy link
Contributor

Maybe we need to check if the current zoom level is greater than the default zoom level defined in the code, and then consider the current zoom level. Otherwise, we should use the default one.

Signed-off-by: jamal-khey <myjamal89@gmail.com>
@jamal-khey jamal-khey force-pushed the jamalkhey/locate-substation-with-zoom branch from 1891533 to 26fd64b Compare November 5, 2024 18:09
@jamal-khey
Copy link
Contributor Author

Maybe we need to check if the current zoom level is greater than the default zoom level defined in the code, and then consider the current zoom level. Otherwise, we should use the default one.

Done , i keep the max between previous and new zoom level

Copy link
Contributor

@souissimai souissimai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, code OK

Copy link

sonarqubecloud bot commented Nov 7, 2024

@jamal-khey jamal-khey merged commit ab27786 into main Nov 8, 2024
5 checks passed
@jamal-khey jamal-khey deleted the jamalkhey/locate-substation-with-zoom branch November 8, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants