Closed dethe closed 5 years ago
In case it isn't obvious I used @raphinesse's suggestion for making this a non-breaking change, so atrament()
and new Atrament()
work with either the old API or with a new options object. I did use rest and spread operators, but I figured we were already using let and const so it should work in the same browsers.
@dethe amazing, thanks for this! I'm actually much more in favour of the config object, I wrote this library when I finished university so the current API isn't quite to my liking, too.
Doing it this way is ideal as it won't break compatibility.
Glad you liked it. I'd be interested in hearing how you would prefer the API to look, as I'm digging in now to add zoom / pan / rotate.
Change Atrament constructor (and function) to accept either (selector, width, height, color) or (selector, config).
Fixes: jakubfiala#32