Skip to content

Commit

Permalink
Fixed default color on svg interpretation: issue 63
Browse files Browse the repository at this point in the history
  • Loading branch information
jonobr1 committed Jan 28, 2014
1 parent 7f17fd6 commit 7480cd8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 20 deletions.
6 changes: 6 additions & 0 deletions build/two.clean.js
Expand Up @@ -399,6 +399,7 @@
},

polygon: function(node, open) {

var points = node.getAttribute('points');

var verts = [];
Expand All @@ -407,6 +408,7 @@
});

var poly = new Two.Polygon(verts, !open).noStroke();
poly.fill = 'black';

return Two.Utils.applySvgAttributes(node, poly);

Expand Down Expand Up @@ -624,6 +626,7 @@
points = _.compact(points);

var poly = new Two.Polygon(points, closed, undefined, true).noStroke();
poly.fill = 'black';

return Two.Utils.applySvgAttributes(node, poly);

Expand All @@ -646,6 +649,7 @@

var circle = new Two.Polygon(points, true, true).noStroke();
circle.translation.set(x, y);
circle.fill = 'black';

return Two.Utils.applySvgAttributes(node, circle);

Expand All @@ -669,6 +673,7 @@

var ellipse = new Two.Polygon(points, true, true).noStroke();
ellipse.translation.set(x, y);
ellipse.fill = 'black';

return Two.Utils.applySvgAttributes(node, ellipse);

Expand All @@ -693,6 +698,7 @@

var rect = new Two.Polygon(points, true).noStroke();
rect.translation.set(x + w2, y + h2);
rect.fill = 'black';

return Two.Utils.applySvgAttributes(node, rect);

Expand Down
6 changes: 6 additions & 0 deletions build/two.js
Expand Up @@ -1843,6 +1843,7 @@ var Backbone = Backbone || {};
},

polygon: function(node, open) {

var points = node.getAttribute('points');

var verts = [];
Expand All @@ -1851,6 +1852,7 @@ var Backbone = Backbone || {};
});

var poly = new Two.Polygon(verts, !open).noStroke();
poly.fill = 'black';

return Two.Utils.applySvgAttributes(node, poly);

Expand Down Expand Up @@ -2068,6 +2070,7 @@ var Backbone = Backbone || {};
points = _.compact(points);

var poly = new Two.Polygon(points, closed, undefined, true).noStroke();
poly.fill = 'black';

return Two.Utils.applySvgAttributes(node, poly);

Expand All @@ -2090,6 +2093,7 @@ var Backbone = Backbone || {};

var circle = new Two.Polygon(points, true, true).noStroke();
circle.translation.set(x, y);
circle.fill = 'black';

return Two.Utils.applySvgAttributes(node, circle);

Expand All @@ -2113,6 +2117,7 @@ var Backbone = Backbone || {};

var ellipse = new Two.Polygon(points, true, true).noStroke();
ellipse.translation.set(x, y);
ellipse.fill = 'black';

return Two.Utils.applySvgAttributes(node, ellipse);

Expand All @@ -2137,6 +2142,7 @@ var Backbone = Backbone || {};

var rect = new Two.Polygon(points, true).noStroke();
rect.translation.set(x + w2, y + h2);
rect.fill = 'black';

return Two.Utils.applySvgAttributes(node, rect);

Expand Down

0 comments on commit 7480cd8

Please sign in to comment.