Skip to content

Commit

Permalink
Path.toDOMElement(): convert the path to a svg <path> DOM element. In…
Browse files Browse the repository at this point in the history
…dentation bugs fixed.
  • Loading branch information
afternoon2 committed Jan 4, 2017
1 parent e980c95 commit 3200733
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ Path.prototype.toSVG = function(decimalPlaces) {
return svg;
};

Path.prototype.toHTML = function(decimalPlaces) {
var temporaryPath = this.toPathData(decimalPlaces);
var newPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
Path.prototype.toDOMElement = function(decimalPlaces) {
var temporaryPath = this.toPathData(decimalPlaces);
var newPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');

newPath.setAttribute('d', temporaryPath);
newPath.setAttribute('d', temporaryPath);

return newPath;
return newPath;
};

exports.Path = Path;

0 comments on commit 3200733

Please sign in to comment.