Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed Oct 7, 2014
1 parent 64fb5bb commit d3a760b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions timeline.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

var $ = require("jquery");

var offset_left = 30;
var offset_top = 20;
var offset_left = 30; // offset left for group name.
var offset_top = 20; // offset top for date header.
var year_width = 100; // width per date (year).

var year_width = 100;

function Markline (element, data) {
this._element = $(element);
Expand All @@ -13,6 +13,8 @@ function Markline (element, data) {
this.body = data.body || {};
}

// @param {Number} distance, two date distance milliseconds.
// @return {Number} line width.
function calcLength(distance){
return parseInt((distance / (24 * 60 * 60 * 1000)) * year_width / 365.24, 10);
}
Expand Down

0 comments on commit d3a760b

Please sign in to comment.