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

scalebar - increase spectrum (finer unit differentiation) #54

Merged
merged 4 commits into from
May 1, 2017

Conversation

waxenegger
Copy link
Member

@waxenegger waxenegger commented Apr 25, 2017

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

this.UNITS = [
{ unit: 'micron', multiplier: 1, symbol: 'µm'},
{ unit: 'millimeter', multiplier: 1000, symbol: 'mm'}];
{ unit: 'angstrom',
Copy link
Member

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)

Copy link
Member Author

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?

@jburel
Copy link
Member

jburel commented Apr 27, 2017

The change of cursor is not obvious when dragging the scale bar: switch to hand cursor maybe in that case?
To consider (maybe not in this PR) during the UI refactoring is:

  • remember scale bar location when selecting a new image i.e. back to bottom right each time. I can see that being annoying for users

@waxenegger
Copy link
Member Author

waxenegger commented Apr 27, 2017

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.

@jburel
Copy link
Member

jburel commented Apr 27, 2017

if you keep the scale bar always visible, make sure you do not change header.js or header.html

This will conflict with #55

alternatively change could be made in #55 if it makes things easier

@jburel
Copy link
Member

jburel commented Apr 28, 2017

It works as expected, cursor is now changed. Easier to follow I think
Remembering the scale bar location could be handled in another PR

@jburel
Copy link
Member

jburel commented May 1, 2017

Merging

@jburel jburel merged commit 96a2b63 into ome:master May 1, 2017
@waxenegger waxenegger deleted the scalebar_spectrum branch May 15, 2017 01:24
@jburel jburel modified the milestone: 0.1.0 May 25, 2017
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