Masth0/ScratchCard

Callback not fired when using htmlBackground instead of imageBackgroundSrc

Closed this issue · 3 comments

I'm trying to use the htmlBackground property however the callback related to the percentToFinish doesn't seem to be executed.

I am using version 1.4.4, and I have replicated it here: https://stackblitz.com/edit/js-sh6mv3?file=index.js

Hello, i take a look asap.
thx.

Your containerHeight is much taller than your content so if you 'scratch' just the image area the percent is smaller than your half of containerHeight.
Just adjust the canvas size to your content size.

Perfect that did it :) thanks a lot.