otm / svg.path.js

A path extension for the svg.js library
http://otm.github.io/svg.path.js/
95 stars 32 forks source link

allow SVG.Path to be instantiated directly via `new SVG.Path` #9

Closed pklingem closed 10 years ago

pklingem commented 10 years ago

prior to this change, attempting to create an SVG.Path via new SVG.Path would produce the following output in the console:

Error: Invalid value for <path> attribute d="undefined M0 40"
pklingem commented 10 years ago

@otm I've updated my pull request to fix grunt errors and include the minified version of the output. Please let me know if there's anything you'd like me to address before merging.

otm commented 10 years ago

Sorry for the late answer.

Thanks for the PR. Could you please explain when you would like to create a path like that? That is, new SVG.Path()

I have incorporated the fix now in commit 73ada4a7bbc48b8bf448005c51dc07f0420caf5d

pklingem commented 10 years ago

I created a Backbone.SVG class which created elements based on a nodeType property, nodeType being, SVG.Path etc. The constructor would call new this.nodeType and grab the node and set it to the el property.

otm commented 10 years ago

Thanks for the explanation.