added rounding to the wfm sidebar to make sure numbers arent too long

master
Ondřej Hruška 9 years ago
parent 5376f1ba7b
commit b091727ddd
  1. 6
      html/js/all.js
  2. 2
      html_src/css/app.css.map
  3. 6
      html_src/js-src/page_waveform.js
  4. 5
      html_src/js-src/utils.js
  5. 6
      html_src/js/all.js
  6. 2
      html_src/js/all.js.map
  7. 3
      html_src/sass/layout/_modal.scss

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -33,9 +33,9 @@ var page_waveform = (function () {
// Sidebar // Sidebar
$('#stat-count').html(j.stats.count); $('#stat-count').html(j.stats.count);
$('#stat-f-s').html(j.stats.freq); $('#stat-f-s').html(numfmt(j.stats.freq, 2));
$('#stat-i-peak').html(peak); $('#stat-i-peak').html(numfmt(peak, 2));
$('#stat-i-rms').html(j.stats.rms); $('#stat-i-rms').html(numfmt(j.stats.rms, 2));
$('.stats').removeClass('invis'); $('.stats').removeClass('invis');
// --- chart --- // --- chart ---

@ -2,6 +2,11 @@ function bool(x) {
return (x === 1 || x === '1' || x === true || x === 'true'); return (x === 1 || x === '1' || x === true || x === 'true');
} }
function numfmt(x, places) {
var pow = Math.pow(10, places);
return Math.round(x*pow) / pow;
}
/** /**
* Perform a substitution in the given string. * Perform a substitution in the given string.
* *

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -45,8 +45,11 @@
position: fixed; position: fixed;
bottom: dist(2); bottom: dist(2);
padding: dist(-1) dist(0); padding: dist(-1) dist(0);
// center horizontally
left: 50%; left: 50%;
@include translate(-50%,0); @include translate(-50%,0);
// hack to remove blur in chrome
-webkit-font-smoothing: subpixel-antialiased; -webkit-font-smoothing: subpixel-antialiased;
-webkit-transform: translateZ(0) scale(1.0, 1.0); -webkit-transform: translateZ(0) scale(1.0, 1.0);

Loading…
Cancel
Save