loktar00 / JQuery-Snowfall

Makes it snow on any web page or specific element.
http://loktar00.github.io/JQuery-Snowfall/
711 stars 221 forks source link

Scrollbars flashes #21

Closed Lechus closed 9 years ago

Lechus commented 9 years ago

Example with images makes scrollbar flashes from time to time. I think it could help prevent it. CSS: body {overflow:hidden;}

loktar00 commented 9 years ago

Which browser is this happening in? Overflow hidden would stop the flashing scroll bar however wouldn't be compatible with many sites out there. There is an offset for the flakes

        // This will reduce the horizontal scroll bar from displaying, when the effect is applied to the whole page
        if($(element).get(0).tagName === $(document).get(0).tagName){
            widthOffset = 25;
        }

You can try increasing that to lower the chance of them running offscreen.

neugartf commented 9 years ago

I have that bug in Chrome v38.0.2125.111 with the demo page too. (horizontal and vertical)

Silarn commented 9 years ago

There is a bug with resizing where the flakes don't always update their boundaries. I have a branch which addresses this by slightly delaying the resetting of the height and width attributes and by allowing the flake positions to 'scale' horizontally if you resize the window.

However, if you enable snow collection I don't think the canvas is currently doing anything to reposition itself.

loktar00 commented 9 years ago

You're right about the canvas elements, the canvas implementation was kind of half assed, I've been half tempted to take it out and just create a separate repo for that.

Not sure if I noticed the fix for the scrollbar in the merge.. hopefully I didn't overwrite it with any of my changes.

loktar00 commented 9 years ago

I haven't noticed the scroll bars since @Silarn code was merged going to close this for now.