Skip to content

Commit

Permalink
Wrap some long lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jan 13, 2017
1 parent 60b1b2b commit 87801cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/canvas/lineFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ var canvas_lineFeature = function (arg) {
cur.opacity = strokeOpacityFunc(line[0], 0, d, i);
cur.linecap = lineCapFunc(line[0], 0, d, i);
cur.linejoin = lineJoinFunc(line[0], 0, d, i);
cur.strokeStyle = 'rgba(' + (cur.color.g * 255) + ', ' + (cur.color.g * 255) + ', ' + (cur.color.b * 255) + ', ' + (cur.opacity !== undefined ? cur.opacity : 1) + ')';
if (last.strokeStyle !== cur.strokeStyle || last.width !== cur.width || last.linecap !== cur.linecap || last.linejoin !== cur.linejoin || last.miterlimit !== cur.miterlimit) {
cur.strokeStyle = 'rgba(' + (cur.color.g * 255) + ', ' +
(cur.color.g * 255) + ', ' + (cur.color.b * 255) + ', ' +
(cur.opacity !== undefined ? cur.opacity : 1) + ')';
if (last.strokeStyle !== cur.strokeStyle || last.width !== cur.width ||
last.linecap !== cur.linecap || last.linejoin !== cur.linejoin ||
last.miterlimit !== cur.miterlimit) {
if (last.strokeStyle !== undefined) {
context2d.stroke();
}
Expand Down

0 comments on commit 87801cd

Please sign in to comment.