vanta icon indicating copy to clipboard operation
vanta copied to clipboard

Canvas does not fit the full width of the selected element in chromium browsers

Open JonathanCE opened this issue 3 years ago • 2 comments

It is a weird thing, using a chromium based browser, like edge or chrome, on my 15.6 inch laptop, the canvas does not fill the entire element, only like 4/5 of it. The effect I am using is WAVES, and it works well on firefox on my laptop, I opened it on an ipad using safari and worked good as well, and in firefox and chrome on android works as well

JonathanCE avatar Dec 27 '21 07:12 JonathanCE

I have fixed it for now, I found that the error was caused by using flex in the same container that I was pointing the animated canvas, so I just put the elements in a subcontainer and in there I added flex, leaving the main container clean and the animation works. Though I do not know why it cannot work along flex

JonathanCE avatar Dec 27 '21 21:12 JonathanCE

Here's an example with flex, and it seems to work OK. https://jsfiddle.net/y0698jac/

I might be missing something. Could you provide a fiddle of the error?

tengbao avatar May 07 '22 02:05 tengbao

closing as resolved

tengbao avatar Sep 16 '22 05:09 tengbao