witheve / rfcs

Request for Comments on changes to Eve
http://witheve.com
28 stars 6 forks source link

SVG path element #9

Closed btheado closed 8 years ago

btheado commented 8 years ago

I copied an svg icon from the internet and translated it into eve syntax, but it didn't fully render and it appears jssrc/renderer.js doesn't support the svg path element. Does it make sense to add support for the path element?

Here is the svg example:

[#svg class: "tc-image-edit-button tc-image-button" viewBox: "0 0 128 128" width: "22pt" height: "22pt" children:
  [#g fill-rule: "evenodd" children:
    [#path d: "M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z" transform: "translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) "]
    [#path d: "M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z"]]]
joshuafcole commented 8 years ago

Yep! At the moment, we're adding white-listed elements ad hoc as they become necessary, because our namespacing solution isn't ready yet, so every tag the renderer consumes is one that user's can't freely use. That said, the path element is a pretty important SVG tag, so I'd be happy to accept a PR adding support for it.

btheado commented 8 years ago

Thanks. BTW, I thought I was adding this issue to the eve repository. It doesn't seem to belong as well here in the RFC repository.

ibdknox commented 8 years ago

Yeah, let's move this over the main Eve repo.

cmontella commented 8 years ago

I'm going to close this issue, discussion can be found here: https://github.com/witheve/Eve/pull/424