JoeChapman / svg-builder

Simple, chainable SVG-building tool for NodeJS and the browser (with Browserify)
41 stars 13 forks source link

logic seems backward for permittedAttributes #13

Open armoredpigeon opened 2 years ago

armoredpigeon commented 2 years ago

The if block in element.js line 49 is saying "if the attribute is found in the list of permitted attributes, throw an error saying it's not permitted." This seems like it should be the other way around.

That said, the circle's attributes r, cx and cy are all left out of attributes/index.js, so changing the logic to work the way it seems it should would require adding to things. The same probably goes for other elements.