This repository has been archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Show pixel info under the mouse when previewing image. #5944
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent issue near top left corner of the image.
Make some improvements based on the review feedback.
Conflicts: src/editor/ImageViewer.js
Show crosshair cursor if the image is too narrow in width or height.
ghost
assigned couzteau
Nov 11, 2013
// If the image size is too narrow in width or height, then | ||
// show the crosshair cursor since guides are almost invisible | ||
// in narrow images. | ||
if (this.naturalWidth < 20 || this.naturalHeight < 20) { |
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.
I suggest to factor in the scale, i.e. if you have an image that is 22px but you are only seeing it at 27 percent (as possible i.e. when viewing brackets/src/style/images/active_black.png - very wide and small) you'd still not see th crosshair, but it would be useful, the mous position is a bit difficult to see.
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.
Good suggestion! fixed.
Done with review for now. |
@couzteau Ready for re-review. |
Done with review. Works great. Preview Images much improved! Merging. |
couzteau
added a commit
that referenced
this pull request
Nov 11, 2013
Show pixel info under the mouse when previewing image.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Showing the image tip on the top right of the cursor until there is no room on the right. When no room on the right, then the image tip shows up on the top left of the cursor. We draw two crossing guides to indicate the cursor location. But for an image that is narrow than 20 pixels in width or height, we also show the crosshair cursor since the guides are pretty useless for small images.