Masth0 / ScratchCard

ScratchCard is a js lib to simulated a scratchcard in browser with html5 and canvas.
MIT License
153 stars 49 forks source link

Responsive UX #13

Closed jonaswebdev closed 5 years ago

jonaswebdev commented 5 years ago

Hi again :)

I'm with difficulties trying to turn the scratch-off responsive, always that I tried to handle the canvas element, it loses the visibility (hide) and displays the background/image.

I noted that this project demonstration, the Scratch-Off element is small, apparently to don't be necessary to handle the dimensions for responsive. so is it was purposeful?

Do you have the idea of how to handle the canvas keeping it over the background image?

I'm willing to help in the development of this feature, if you guide me I can implement and send the PR to you review :)

Merci

Masth0 commented 5 years ago

Hi :) I will understand better if i can reproduce the bug. Do you have an example or something else ?

jonaswebdev commented 5 years ago

Hi @Masth0 sorry by delay...

I tried to tell you about the responsiveness about the Scratch-off card, I have an issue on my implementation but I checked your demo page and the issue didn't happen there, see: Screenshot 2019-06-27 13 54 06

Maybe this happens on my implementation because I use a bigger and hard-coded width containerWidth: 300, and you use a dynamic width containerWidth: scContainer.offsetWidth, I don't have sure yet but I will check...

So I think you could ignore my issue, sorry and thanks by attention