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

Reduce vertical size of scan plot #953

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

argilo
Copy link
Contributor

@argilo argilo commented Dec 7, 2024

The scan plot takes up quite a lot of precious vertical space. Here I've made it smaller by removing the "Scan Results" heading, reducing the vertical size from 320 pixels (the default) to 200 pixels, and removing the legend.

Before:

Screenshot from 2024-12-07 18-10-22

After:

Screenshot from 2024-12-07 18-09-25

@argilo argilo marked this pull request as ready for review December 7, 2024 23:17
Comment on lines +19 to +21
colors: {
Spectra: "#2f77b4"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing the legend had the side effect of assigning colours to the datasets randomly, so I've explicitly defined them here.

@@ -1272,7 +1272,7 @@
document.getElementById("main").style.marginLeft = "350px";
document.getElementById("mySidenav").style.borderRadius = "0px 25px 25px 0px";
mymap.invalidateSize();
setTimeout(scan_chart_obj.resize,500);
scan_chart_obj.flush();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Calling resize() here would blow away the size set in the constructor, so I've replaced the call with flush(), which forces a redraw. The 500-ms delay seems to have been unnecessary.

@argilo
Copy link
Contributor Author

argilo commented Dec 7, 2024

On Android. Before:

Screenshot_20241207-181048

After:

Screenshot_20241207-180939

@argilo
Copy link
Contributor Author

argilo commented Dec 7, 2024

I noticed that the "Latest Scan" text butts up against the telemetry table. One or the other might need a margin set.

Screenshot from 2024-12-07 18-47-20

@argilo
Copy link
Contributor Author

argilo commented Dec 8, 2024

I added a 0.25em margin above and below the telemetry table, which keeps it separated from tasking section & scan plot.

@darksidelemm darksidelemm merged commit 53431b3 into projecthorus:testing Dec 12, 2024
6 checks passed
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.

2 participants