Skip to content

Commit

Permalink
Style tweaks from peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Feb 11, 2014
1 parent eb69ab7 commit 3c5f8b3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/app/annotationViewer/annotationViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ avModule.controller('AnnotationViewerCtrl', ['$scope', '$element', '$attrs', '$t
min: 0,
step: 1000,
height: 256,
labelFormatter: function(value) {
labelFormatter: function(value, index, min, max) {
return (value / 1000).toFixed(1);
},
title: "Frequency (KHz)"
Expand All @@ -63,8 +63,11 @@ avModule.controller('AnnotationViewerCtrl', ['$scope', '$element', '$attrs', '$t
min: 0,
step: 1,
width: 1292,
labelFormatter: function(value) {
return value.toFixed(0);
labelFormatter: function(value, index, min, max) {
// show 'absolute' time.... i.e. seconds of the minute
var offset = (value % 60);

return (offset).toFixed(0);
},
title: "Time offset (seconds)"
}
Expand Down
8 changes: 6 additions & 2 deletions src/app/annotationViewer/gridLines/_gridLines.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
$gridLines: rgba(0, 0, 255, 0.30);
$gridLines: rgba(66, 139, 202, 0.40);
$scale-background: #f5f5f5; //#7eff5f

@mixin scale-base() {
background-color: $scale-background;
font-family: $font-family-monospace;
font-size: $font-size-small;
font-size: $font-size-small;;
line-height: 1.0;
position: absolute;
color: $gray;
}

& .gridLines {
Expand Down Expand Up @@ -71,6 +72,9 @@ $scale-background: #f5f5f5; //#7eff5f
position: absolute;
@include vendor-prefix(transform, translateY(-50%) translateX(-100%));
background-color: $scale-background;
&:first-child {
left: -0.5em;
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/app/annotationViewer/gridLines/gridLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ bawGLs.directive('gridLines',
}
result.push({value: max, position: size});

// lastly tag return object with data - a bit hacky
result.min = min;
result.max = max;

return result;
}

Expand Down Expand Up @@ -96,7 +100,7 @@ bawGLs.directive('gridLines',
var element = container.children[j - start];

if (innerText) {
element.innerText = formatter(steps[j].value);
element.innerText = formatter(steps[j].value, j, steps.min, steps.max);
}

var position = steps[j].position;
Expand Down
2 changes: 2 additions & 0 deletions src/app/listen/_listen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@
position: absolute;
left: 0px;
top: 0px;
@include vendor-prefix(transform, translateX(-50%));
}

& .right {
position: absolute;
right: 0px;
top: 0px;
@include vendor-prefix(transform, translateX(50%));
}

& .btn-toolbar {
Expand Down

0 comments on commit 3c5f8b3

Please sign in to comment.