-
Notifications
You must be signed in to change notification settings - Fork 30
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
scalebar - increase spectrum (finer unit differentiation) #54
Conversation
this.UNITS = [ | ||
{ unit: 'micron', multiplier: 1, symbol: 'µm'}, | ||
{ unit: 'millimeter', multiplier: 1000, symbol: 'mm'}]; | ||
{ unit: 'angstrom', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to the utils package since we will need to use the units in the new info tab (I will open a PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is part of the ol3-viewer and there is no shared code as such, only eventbus communication. Also I'm not too sure how it will be reused since the default unit is micron (as it seems from the code). At most I'd get the symbol out of a shared definition, right?
The change of cursor is not obvious when dragging the scale bar: switch to hand cursor maybe in that case?
|
no cursor icon yet but I'm going to put in one. As discussed, I'm going to display the scalebar by default (if possibe - pixel size). Keeping the location can be done, the one thing that needs to be handled is if the window size is not the same and the scalebar would be off (in the not visible part). I'm not entirely sure if we should keep the location across images but at least in between on/off toggles of the scalebar. |
It works as expected, cursor is now changed. Easier to follow I think |
Merging |
So far the scalebar showed a lesser degree of differentiation. It now covers -like the present web- from angstrom to meters.
see also: https://trello.com/c/jzBkvdaC/24-units-of-pixels-size-missing-from-json