derhuerst / svg-world-map

Show a location on a world map.
http://jannisr.de/svg-world-map/
ISC License
19 stars 6 forks source link

h function -> svg function to generate virtual-dom. Stringifycation issue using h function with new package vdom-to-html #18

Open netbofia opened 5 years ago

netbofia commented 5 years ago

The use of h from virtual-dom loses it's properties when converting to string with vdom-to-html

derhuerst commented 5 years ago

Thanks for reporting! Would you mind giving a specific example?

netbofia commented 5 years ago

@derhuerst I think your example in the README might workout, but the package virtual-dom-stringify in your example is marked as deprecated. The suggested replacement is the package vdom-to-html, however the "virtual-hyperscript" generated from the render function in index.js makes use of the h function. When you perform the convention of those elements, most properties are lost. My fix uses the svg function instead, which can be converted properly, with the new suggested package vdom-to-html, retaining all the properties in the conversion.

derhuerst commented 5 years ago

I checked all your PRs together and it still doesn't work, sorry.