Skip to content

Conversation

@naglepuff
Copy link
Collaborator

@naglepuff naglepuff commented Oct 23, 2025

Adds an additional layer to handle axes that are fixed to the edges of the GeoJS viewer. Supports features like:

  1. Changing x/y scale via Ctrl+scroll or Shift+scroll
  2. Toggling grid lines
  3. Toggling between compressed and uncompressed views
  4. Changing scale depending on zoom level and position of spectrogram quad

Adds state management to toggle between current axes implementation (default) or fixed axes.

@naglepuff naglepuff changed the title Add fixed Y axis and reactive ticks Add secondary axis display that is fixed to viewport Oct 29, 2025
@naglepuff naglepuff changed the title Add secondary axis display that is fixed to viewport Add secondary fixed axis display Oct 29, 2025
@naglepuff naglepuff requested a review from BryonLewis October 29, 2025 21:43
Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, just a few minor things that mostly have to do with the scaling of text.

The Midpoint text gets mixed up with the endpoints based on the zoom level and the data:
image

Maybe offset the mid-points, higher up than the start/end in the compressed view so they don't run into each other.

When zoomed out completely there is also text that is overwriting items.
image
I know that in the standard view I think I did something with text scaling as the user zooms out to reduce text size so that the elements are still there but are smaller.
This issue with the text also applies to the X-Scaling. I.E if you are in the compressed view we default to an X-Scaling of 2.5 but it can reduce back to 1 (using ctrl+scroll). As it reduces I make the size smaller and then will hide the text if it gets too small (below 1.5x).

@naglepuff
Copy link
Collaborator Author

Text scaling has been added by inheriting from BaseTextLayer. I've also added staggering for midpoint labels on the x-axis for the compressed view.

@naglepuff naglepuff requested a review from BryonLewis November 3, 2025 22:14
@BryonLewis
Copy link
Collaborator

Text scaling has been added by inheriting from BaseTextLayer. I've also added staggering for midpoint labels on the x-axis for the compressed view.

I think you may need to add something for X-scaling (ctrl+scroll) as well. Maybe hiding the display once you get below 1.5X size or so or reducing the text size more.

@naglepuff
Copy link
Collaborator Author

I think you may need to add something for X-scaling (ctrl+scroll) as well. Maybe hiding the display once you get below 1.5X size or so or reducing the text size more.

Fixed by looking at the existing legendLayer, and using the same technique there to dynamically decide font size/visibility based on X-scale. (b7c0ae0)

Also updated the threshold for showing midpoints to compare number of visible segments to a constant. Previously if a spectrogram had many many segments in the compressed view, the midpoints would show up at the default zoom level, which subjectively looked too busy.

@naglepuff naglepuff marked this pull request as ready for review November 4, 2025 16:49
Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

Everything looks good, thanks.

@naglepuff naglepuff merged commit 78edbbc into main Nov 5, 2025
4 checks passed
@naglepuff naglepuff deleted the fixed-axes branch January 15, 2026 19:07
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