-
Notifications
You must be signed in to change notification settings - Fork 31
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
slider range fix #213
slider range fix #213
Conversation
Do you have such images already imported? |
@jburel : There were a couple of figures I had made with the python script, please check the following figure, http://web-dev-merge.openmicroscopy.org/figure/file/19810/ |
user-1 on eel |
The range issue is fixed. |
The background for the slider is because the script we used has set the channel color to |
improving the "expected" value will be good i.e. handling both |
Last commits should fix the slider background on channels with colour NB: This PR includes tiny fixes to shape-editor.js which should be ported to a new shape-editor 2.0.1 but that repo is currently being migrated to ome... |
src/js/views/channel_slider_view.js
Outdated
var max = maxs.reduce(reduceFn(Math.max), -9999); | ||
var min = mins.reduce(reduceFn(Math.min)); | ||
var max = maxs.reduce(reduceFn(Math.max)); | ||
console.log(min, max); |
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.
console.log
tend to be removed, right? Have you looked into a longer-term debugging strategy? Likely depends on the framework of course but https://stackoverflow.com/questions/94934/what-debug-logging-tools-are-available-from-javascript
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.
@joshmoore it's perfectly true that logs for development and debugging purposes should of course be taken out (for production) but the stackoverflow topic as well as other discussions are all based on what I would call an obsolete condemnation of the use of cosole.xxx methods for logging. They used to not be implemented by all browsers and/or undefined (if not in the dev tools) but that is a thing of the past: https://developer.mozilla.org/en/docs/Web/API/Console/log
I actually use console.error in some try/catch to log an error because given minification and loaders it is almost the only way to log an error and have the user (telling them to press F12) communicate the error to you. The only other way -and I have thought about this multiple times myself- is to implement as logging resource/service (restful I guess) and post errors to it via ajax. That could be fairly neat and relatively simple thing. Multiple web apps could make use of that.
Latest change works, choosing white color results in #ccc background. |
@will-moore could you remove the |
@jburel Sorry, missed that. Removed it now. |
Maybe also remove the change to shape-editor |
@jburel Removed changes to shape-editor. |
Changes can be made against https://github.com/ome/shape-editor |
As noticed by @bramalingam, if images have min-intensity above 9999 then the slider range
min
was incorrectly set at 9999, since this was hard coded.Same is true for slider max.
This should now be fixed.
To test: