Browse Source

Tweak variable names in slider initialization JS

pull/708/head
Pēteris Caune 2 years ago
parent
commit
7d625a6844
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
  1. 6
      static/js/log.js

6
static/js/log.js

@ -1,14 +1,14 @@
$(function () {
var SMALL_LABEL = 2;
var BIG_LABEL = 1;
var SMALL_LABEL = 2;
var PIP = 0;
var NO_PIP = -1;
var slider = document.getElementById("log-slider");
var smin = parseInt(slider.dataset.min);
var smax = parseInt(slider.dataset.max);
var deltaHours = (smax - smin) / 3600;
var pixelsPerHour = slider.clientWidth / deltaHours;
var pixelsPerSecond = slider.clientWidth / (smax - smin);
var pixelsPerHour = pixelsPerSecond * 3600;
var pixelsPerDay = pixelsPerHour * 24;
var dayGap = Math.round(0.5 + 80 / pixelsPerDay);

Loading…
Cancel
Save