This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Random path and shape generator, flattener test base: https://jsfiddle.net/fjm9423q/embedded/result/ | |
Basic usage example: https://jsfiddle.net/nrjvmqur/embedded/result/ | |
Basic usage: flatten(document.getElementById('svg')); | |
What it does: Flattens elements (converts elements to paths and flattens transformations). | |
If the argument element (whose id is above 'svg') has children, or it's descendants has children, | |
these children elements are flattened also. |