airfranceklm / ng-lazy-image

Angular directive for loading responsive image when container (which is preventing reflow) is in viewport.
http://afklm.github.io/ng-lazy-image/
MIT License
351 stars 64 forks source link

Directive doesn't watch for viewport changes #7

Closed TimonVS closed 9 years ago

TimonVS commented 9 years ago

The directive doesn't watch for viewport changes (e.g. rotating your phone/tablet or resizing your browser window).

SquadraCorse commented 9 years ago

There is a resize event, which does check with throttle if other image size fits better

TimonVS commented 9 years ago

@SquadraCorse There is indeed a resize event, but it doesn't load the images if they get in the view. I've already created a PR with a simple fix.

SquadraCorse commented 9 years ago

I saw it, scrolling was throttled because otherwise performance killer. Thanks for mentioning resizing can push new containers into view as well!!