jodhman / react-eyedrop

Seamlessly integrate a static typed, fully-tested color-picking React component/hook!
24 stars 11 forks source link

Bugfix/background property targeting #65

Closed chanatorns closed 6 months ago

chanatorns commented 6 months ago

Hello again, I found that we cannot pick color from css background image. After checking carefully I understand that the 'elementToCanvas' was created to support picking color from css's background image, but it is still have some cases that are not supported, for example...

I found that html2canvas is able to support picking color form css's background image nicely and able to support above cases. Only concern I previously had is performance, anyway after testing recently I didn't found any performance issue. So I think we can let html2canvas handle this and we can remove 'elementToCanvas'. This is what's changed in this PR.

  1. Fix to support picking color from css's background image.
  2. Add more example to show case about css background image.
  3. Update enzyme adapter to be the same version with current react's version with v17
jodhman commented 6 months ago

Hello @chanatorns! Sounds good, will make another release within the days.

chanatorns commented 6 months ago

@jodhman Thankyou! looking forward to it.

jodhman commented 6 months ago

Version 5.5.1 released on npm! :rocket: