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

Commit

Permalink
eliminate images "jumping" effect
Browse files Browse the repository at this point in the history
after loading the properties in image viewer
  • Loading branch information
Simek committed Oct 30, 2013
1 parent 5cc989c commit 5c76765
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
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

0 comments on commit 5c76765

Please sign in to comment.