component-size icon indicating copy to clipboard operation
component-size copied to clipboard

Does not work with SVG elements

Open mdekrey opened this issue 6 years ago • 0 comments

offsetHeight/offsetWidth do not work with elements often in the DOM that are not actually HTML Elements, for example, SVG elements.

I'd recommend using clientHeight/clientWidth when the offset versions are undefined, but it could be considered a breaking change.

Another possibility would be to allow the passing of a callback to override getSize.

mdekrey avatar May 27 '19 16:05 mdekrey