Skip to content

Show Reset Zoom button when zoomed in#2813

Merged
rdwebdesign merged 2 commits into
development-v6from
new/reset-zoom
Nov 8, 2023
Merged

Show Reset Zoom button when zoomed in#2813
rdwebdesign merged 2 commits into
development-v6from
new/reset-zoom

Conversation

@DL6ER

@DL6ER DL6ER commented Nov 8, 2023

Copy link
Copy Markdown
Member

What does this implement/fix?

Show Reset Zoom buttons when zooming in

ezgif-3-59b44a1c45

The clients chart was already zoomed in when starting the recording.

Javascript-wise, this may not be the most elegant way, but without the chain of

parent().parent().parent()

neither .find() nor .closest() were able to find the elements I was looking for.


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER requested a review from a team November 8, 2023 09:37
- use class to style buttons and info icons (move style to pi-hole.css)
- add negative margin to avoid small jump when the button is shown
- use the new classes to simplify jquery selectors

@yubiuser yubiuser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works nicely. If @rdwebdesign does not have any additional good idea how to handle $(chart.canvas).parent().parent().parent().find this is good to go.

@rdwebdesign rdwebdesign merged commit 6c42c7d into development-v6 Nov 8, 2023
@rdwebdesign rdwebdesign deleted the new/reset-zoom branch November 8, 2023 21:02
@PromoFaux PromoFaux mentioned this pull request Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants