get-node-dimensions icon indicating copy to clipboard operation
get-node-dimensions copied to clipboard

Cloning elements is removing decimals

Open bookman25 opened this issue 8 years ago • 1 comments

Currently when an element is not cloned, it's using the actual width including decimal points. But when cloning it's rounding.

I believe the first option is more correct: https://github.com/souporserious/get-node-dimensions/blob/master/src/get-node-dimensions.js#L24-L25

I think this should be updated to just return rect and not use the offset's: https://github.com/souporserious/get-node-dimensions/blob/master/src/get-clone-dimensions.js#L39-L40

bookman25 avatar Feb 28 '17 14:02 bookman25

Ah I can't remember why I would have done this. It might have had to with getBoundingClientRect taking transforms into account or something. I'll look into this. Thanks for letting me know :)

souporserious avatar Feb 28 '17 20:02 souporserious