(inject-element-attribs root)
(inject-element-attribs f root)
Walks SVG DOM tree with thi.ng.dstruct.core/postwalk and applies given function to each element node. The fn takes 2 args: the element itself and its attribute map. The fn's return value will be used as the new attribute map.
Walks SVG DOM tree with thi.ng.dstruct.core/postwalk and applies given function to each element node. The fn takes 2 args: the element itself and its attribute map. The fn's return value will be used as the new attribute map.
(key-attrib-injector el attribs)
To be used with inject-element-attribs, generates an unique :key attrib for each SVG element w/o :key attrib. Returns updated attribs.
To be used with inject-element-attribs, generates an unique :key attrib for each SVG element w/o :key attrib. Returns updated attribs.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close