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
350 stars 64 forks source link

Several enhancements #4

Closed ledzep2 closed 10 years ago

ledzep2 commented 10 years ago
  1. Add a container directive, so it can work when the viewport is not window.
  2. Observe source changes, so the image can be modifed at runtime.
  3. Use methods provided by jquery whenever possible to improve compatibility and accuracy.
SquadraCorse commented 10 years ago

Nice work! Can you also update giving a usecase in our 'src/index.html' if you have time so it will be shown on http://afklm.github.io/ng-lazy-image/

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-1.45%) when pulling 93680244de5b334006c8b6ae3bde57889d5d78e9 on ledzep2:master into 01ac38867cb8fefe5980c3a6ba49cc20cbc48220 on afklm:master.

ledzep2 commented 10 years ago

Sure. No problem. I'll update it soon.

Just wanna clarify that my enhancement is not jquery dependent. It will fall back to your original methods when jquery is not available. IMHO, angular can take advantage of full-blown jquery when it's there and fall back to jqLite when it's not, why souldn't we?

zao.bi

On Wed, Oct 8, 2014 at 3:56 PM, SquadraCorse notifications@github.com wrote:

We have to think about moving dependency from lite to full jQuery. We tried to get offset in lite version but didn't work out. Personally i hate to introduce jQuery as a dependency but will have look at it. If you have time can you place a use simple use case into src/index.html as well? Thanks so far!

— Reply to this email directly or view it on GitHub https://github.com/afklm/ng-lazy-image/pull/4#issuecomment-58322823.

ledzep2 commented 10 years ago

I just ran the tests with IE11 emulated IE8, 1 case actually fails. I will try to fix it in the next update. But I don't think it's a big deal anyway coz angular has dropped support for IE8 since 1.3.

coveralls commented 10 years ago

Coverage Status

Coverage decreased (-2.63%) when pulling f655f6294d7b4b07749c73cd8d9c8c57f302802e on ledzep2:master into 01ac38867cb8fefe5980c3a6ba49cc20cbc48220 on afklm:master.

SquadraCorse commented 10 years ago

Awesome work!! Realy awesome!