Skip to content

Conversation

@TrevorBurgoyne
Copy link
Member

@TrevorBurgoyne TrevorBurgoyne commented May 30, 2025

Size mode

PLAT-1279

Description

  • Add size_mode argument to the ULabel constructor, which allows users to specify how the size of annotations should be scaled when the zoom level is changed.
    • Options are fixed, zoom, and inverse-zoom.
    • When set to fixed, the line size of annotations will remain constant regardless of zoom level.
    • When set to zoom, the line size of annotations will increase with increased zoom level.
    • When set to inverse-zoom, the line size of annotations will decrease with increased zoom level.
  • Prior behavior is equivalent to size_mode = "fixed".
  • Cleanup of unused demo logic
  • Close Full removal of annotation with "erase" tool breaks submission #220 by adding null catch
  • Close Links to NPM / script version usage docs #211 by adding link to npm page

PR Checklist

  • Merged latest main
  • Version number in package.json has been bumped since last release
  • Version numbers match between package package.json and src/version.js
  • Ran npm install and npm run build AFTER bumping the version number
  • Updated documentation if necessary (currently just in api_spec.md)
  • Added changes to changelog.md

Breaking API Changes

no

@TrevorBurgoyne TrevorBurgoyne added the enhancement New feature or request label May 30, 2025
@joshua-dean joshua-dean requested a review from CarterSolberg May 31, 2025 16:34
@joshua-dean
Copy link
Collaborator

Adding @CarterSolberg as he worked on the deprecated version of a similar feature in the past

Copy link
Collaborator

@joshua-dean joshua-dean left a comment

Choose a reason for hiding this comment

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

Two small notes. Like the demo cleanup

@joshua-dean
Copy link
Collaborator

Also, I don't really foresee it being a need, but while we're here: can you think of any reason we'd want to scale the zoom and inverse-zoom settings?
Right now they're fairly subtle, so perhaps for some case of script-assisted zoom setting/background swapping a user might want the zoom to be more (or less) aggressive.

Definitely not necessary for this PR, but maybe worth thinking about.

@TrevorBurgoyne TrevorBurgoyne added bug Something isn't working documentation Improvements or additions to documentation labels Jul 14, 2025
@TrevorBurgoyne TrevorBurgoyne merged commit 3452bf7 into main Jul 15, 2025
1 check passed
@TrevorBurgoyne TrevorBurgoyne deleted the feature/size-mode branch July 15, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full removal of annotation with "erase" tool breaks submission Links to NPM / script version usage docs

3 participants