fixed broken second marks, added 10s marks

master
Ondřej Hruška 9 years ago
parent 075c525b64
commit 30a5479d13
  1. 4
      html/js/all.js
  2. 14
      html_src/js-src/page_spectrogram.js
  3. 4
      html_src/js/all.js
  4. 2
      html_src/js/all.js.map

File diff suppressed because one or more lines are too long

@ -27,6 +27,7 @@ var page_spectrogram = (function () {
var lastLoadMs;
var lastMarkMs;
var lastMark10s;
var colormap = [
/* [val, r, g, b] */
@ -126,13 +127,19 @@ var page_spectrogram = (function () {
if (msElapsed(lastMarkMs) >= 950) {
lastMarkMs = msNow();
var long = false;
if (msElapsed(lastMark10s) > 9500) {
long = true;
lastMark10s = msNow();
}
ctx.strokeStyle = 'white';
ctx.beginPath();
ctx.moveTo(plot.x+plot.w-.5, plot.y+plot.h+.5);
ctx.lineTo(plot.x+plot.w-.5, plot.y+plot.h+4);
ctx.moveTo(plot.x+plot.w-.5, plot.y+plot.h+1);
ctx.lineTo(plot.x+plot.w-.5, plot.y+plot.h+1+(long?6:2));
ctx.stroke();
} else {
ctx.clearRect(plot.x+plot.w-2, plot.y+plot.h+1,2,4);
ctx.clearRect(plot.x+plot.w-1, plot.y+plot.h+1,2,10);
}
}
@ -318,6 +325,7 @@ var page_spectrogram = (function () {
drawLegend();
drawAxis();
lastMarkMs = msNow()-10000;
lastMark10s = msNow()-10000;
// update tile size on bin count selection
$('#count').on('change', function() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save