CoffeeMugg icon indicating copy to clipboard operation
CoffeeMugg copied to clipboard

Support svg

Open wmertens opened this issue 13 years ago • 2 comments

There's <svg> support in coffeekup (see https://github.com/gradus/coffeecup/commit/07ffa72d92e5d0832566bd0e1e23f82479f8395c), but since CoffeeMugg uses this you could even do one better and switch out this so that under @svg only SVG elements are allowed...

wmertens avatar Aug 15 '12 20:08 wmertens

Nice. Curious what you're using SVG for?

jaekwon avatar Aug 16 '12 00:08 jaekwon

I'm using svg with d3.js which is seriously awesome (check out the examples), which maps an array of data to DOM elements (normally SVG elements but it could be anything) and updates them when the data changes.

My pipe dream is that CoffeeMugg could be used to do the same. At the very least it could be used to create templates that are then assigned using d3 (so it needs SVG support), but I think that using instantiation and some automatic id creation CoffeeMugg could even do the mapping of any data to DOM itself, and then d3 would provide the graphing algorithms. I'm still thinking about it, but it would be something that you run once to generate the html and then again to update elements. You would even be able to generate the html server side and perform the updates in the browser. Once I've got it hammered out I'll create an issue :-).

wmertens avatar Aug 16 '12 20:08 wmertens