Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Small cosmetic tweaks. #5835

Merged
merged 8 commits into from
Nov 5, 2013
Merged

Small cosmetic tweaks. #5835

merged 8 commits into from
Nov 5, 2013

Conversation

larz0
Copy link
Member

@larz0 larz0 commented Nov 3, 2013

See commit messages.

@@ -450,7 +450,7 @@ define(function (require, exports, module) {
$previewContainer.find(".image-preview > img").on("load", function () {
$previewContent
.append("<div class='img-size'>" +
this.naturalWidth + " x " + this.naturalHeight + " " + Strings.UNIT_PIXELS +
this.naturalWidth + " × " + this.naturalHeight + " " + Strings.UNIT_PIXELS +
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be &times; instead of raw high-ascii character.

@RaymondLim
Copy link
Contributor

Done with review.

@larz0
Copy link
Member Author

larz0 commented Nov 5, 2013

@RaymondLim fixed.

@@ -98,7 +98,7 @@ define(function (require, exports, module) {
$("#img-preview").on("load", function () {
// add dimensions and size
_naturalWidth = this.naturalWidth;
var dimensionString = _naturalWidth + " x " + this.naturalHeight + " " + Strings.UNIT_PIXELS;
var dimensionString = _naturalWidth + " &times; " + this.naturalHeight + " " + Strings.UNIT_PIXELS;
Copy link
Contributor

Choose a reason for hiding this comment

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

Now we're using html. So we also need to change .text on line 106 to .html.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we still need to change 106 even though we're using html() on 110?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we do. Since dimensionString is no longer plain text and line 110 is for the case where stat call does not return any error. In the rare case that the stat call returns an error (ie, we can't get the image size), then we still want to show dimensionString as html.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok fixed.

@RaymondLim
Copy link
Contributor

Merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants