federico-moretti / canvas-free-drawing

A JavaScript library that allows you to draw in a canvas HTML element, straightforward to use and extremely lightweight.
https://www.federicomoretti.dev/projects/canvas-free-drawing
MIT License
65 stars 11 forks source link

Redraw event won't trigger when using bucket only #1

Closed zlyfer closed 5 years ago

zlyfer commented 5 years ago

Hey,

when only using the bucket/fill method the redraw event won't be triggered. When drawing with the normal free drawing mode and then using the bucket all works fine, when using the bucket on an empty canvas it won't.

Would be nice if that get's fixed.

Cheers.

federico-moretti commented 5 years ago

Hello, I already suspect the cause of this bug so it should be an easy fix. I also have a bigger update to release so I'll probably ship the fix with that, hopefully this weekend!

Thank you for the report, it's pretty sweet to know that someone else use this library!

zlyfer commented 5 years ago

Hey,

thanks for the reply.

Glad to know that it's still supported. It's an awesome little library and I use it for my own completely from scratch made version of "skribbl[.]io". Although the fill function could be faster but maybe that's already taken care of in the next version your mentioned. ;P

Cheers

federico-moretti commented 5 years ago

I tried a couple of times to increase the performance of the fill function but it's still slower than what I'd like to. If you'd like to do a pull request or suggest anything to speed it up I'll be glad to merge or try it!

Staying in topic, this issue has been fixed on my local repository, I'll release it as soon as I finish add the new APIs to the docs.

Cheers.

federico-moretti commented 5 years ago

Fixed in v1.3.0