Skip to content

Commit

Permalink
See DmitryBaranovskiy#137: Trying to fix the issues with the gutter.
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspotteddog committed Jul 7, 2012
1 parent a4a290c commit bfaaf65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions g.line.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@

var allx = Array.prototype.concat.apply([], valuesx);
var ally = Array.prototype.concat.apply([], valuesy);
var minx = opts.minx || Math.floor(Math.min.apply(Math, allx));
var maxx = opts.maxx || Math.ceil(Math.max.apply(Math, allx));
var miny = opts.miny || Math.floor(Math.min.apply(Math, ally));
var maxy = opts.maxy || Math.ceil(Math.max.apply(Math, ally));
var minx = opts.minx || Math.floor(Math.min.apply(Math, allx) - 1);
var maxx = opts.maxx || Math.ceil(Math.max.apply(Math, allx) + 1);
var miny = opts.miny || Math.floor(Math.min.apply(Math, ally) - 1);
var maxy = opts.maxy || Math.ceil(Math.max.apply(Math, ally) + 1);
var kx = (width - gutter * 2) / ((maxx - minx) || 1);
var ky = (height - gutter * 2) / ((maxy - miny) || 1);

Expand Down

0 comments on commit bfaaf65

Please sign in to comment.