Skip to content

Commit

Permalink
Fix code style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmobrunfeldt committed May 11, 2020
1 parent 996d971 commit 6bd79b0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ var Shape = require('./shape');
var utils = require('./utils');

var Line = function Line(container, options) {
this._pathTemplate = options.vertical ? 'M {center},100 L {center},0' : 'M 0,{center} L 100,{center}';
this._pathTemplate = options.vertical
? 'M {center},100 L {center},0'
: 'M 0,{center} L 100,{center}';
Shape.apply(this, arguments);
};

Line.prototype = new Shape();
Line.prototype.constructor = Line;

Line.prototype._initializeSvg = function _initializeSvg(svg, opts) {
svg.setAttribute('viewBox', opts.vertical ? '0 0 ' + opts.strokeWidth + ' 100' : '0 0 100 ' + opts.strokeWidth);
var viewBoxStr = opts.vertical
? '0 0 ' + opts.strokeWidth + ' 100'
: '0 0 100 ' + opts.strokeWidth;
svg.setAttribute('viewBox', viewBoxStr);
svg.setAttribute('preserveAspectRatio', 'none');
};

Expand Down

0 comments on commit 6bd79b0

Please sign in to comment.