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

eliminate images "jumping" effect after loading the properties in image viewer #5775

Merged
merged 1 commit into from
Nov 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/editor/ImageViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 + " × " + this.naturalHeight + " " + Strings.UNIT_PIXELS;
// get image size
var fileEntry = new NativeFileSystem.FileEntry(fullPath);
fileEntry.getMetadata(
Expand Down
6 changes: 4 additions & 2 deletions src/htmlContent/image-holder.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div id="image-holder">
<div id="img-centering">
<div id="img-data"></div>
<div id="img-path"></div>
<div id="img-header">
<div id="img-data"></div>
<div id="img-path"></div>
</div>
<div id="img">
<div id="img-scale"></div>
<img id="img-preview" src="file:///{{fullPath}}">
Expand Down
12 changes: 8 additions & 4 deletions src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,13 @@ a, img {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.36);
max-height: 90%;
}

#img-header {
display: inline-block;
width: 100%;
height: 38px;
margin-bottom: 15px;
}

#img-data,
#img-path {
Expand All @@ -281,10 +288,7 @@ a, img {
#img-path::selection {
background: @selection-color-focused;
}

#img-path {
margin: 0 0 15px;
}

#img {
position: relative;
}
Expand Down