Skip to content

Commit

Permalink
Code review for spectroLoading branch.
Browse files Browse the repository at this point in the history
 - Corrected bad default image height (255px --> 256px)
 - Moved default image height to image element (divs around image are designed to flex around image... only the image should have fixed dimensions)
 - Corrected an existing bug in the enforcedImageHeight binding - it should now work correctly (also checked, the enforcedImageHeight does override the default height created above)
  • Loading branch information
atruskie committed Dec 11, 2013
1 parent 3eb3195 commit f3c5e97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/app/annotationViewer/_annotation_viewer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ baw-annotation-viewer {
}

& .annotation-viewer {
height: 255px;
display: inline-block;
position: relative;
line-height: 0;
Expand All @@ -85,7 +84,11 @@ baw-annotation-viewer {


& img {

/* set a temporary height to avoid UI jumping around on image load
-- note: this value is usually overridden with a element level style by
the enforcedImageHeight value model.
*/
height: 256px;
}

// overlay
Expand Down
2 changes: 1 addition & 1 deletion src/app/annotationViewer/annotationViewer.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
<div class="annotation-viewer" id="annotation-viewer_{{id}}" >
<img ng-src="{{model.media.spectrogram.url}}" src=""
ng-style="{width: model.converters.enforcedImageWidth, height: model.converters.enforcedImageHeight}">
ng-style="{width: model.converters.conversions.enforcedImageWidth, height: model.converters.conversions.enforcedImageHeight}">
<div id="spectrogramAnnotations_{{id}}" ></div>
<div class="positionLine" baw-translate-x="positionLine()"></div>
</div>
Expand Down

0 comments on commit f3c5e97

Please sign in to comment.