Skip to content

Small bug with images partially visible #56

Closed
jdeniau opened this Issue Feb 26, 2014 · 7 comments

2 participants

@jdeniau
jdeniau commented Feb 26, 2014

I have a small bug detected in responsive case.
Here is the example:

a 1400x400px banner, centered on the browser.

On mobile (let's say width = 500px), the top-left pixel position is top: 0, left: (500 - 1400)/2 = -450px
As 450 > the base offset, the image is considered as not inViewport, but as the image width is 1400, it should be considered "in".

Thank you

@vvo
Owner
vvo commented Feb 26, 2014

@jdeniau For an easy bug resolution of this use case, please provide a working example of the https://github.com/vvo/in-viewport library given your test case.

It should be pretty easy to setup and have a simple console.log() showing true/false.

Can you do that?

@jdeniau
jdeniau commented Feb 26, 2014

It will be easier that way ;)

Here is an example.

@vvo vvo added a commit to vvo/in-viewport that referenced this issue Jun 6, 2014
@vvo fix(overlaps): fix for overlapping divs 16c00b9
@vvo vvo added a commit to vvo/in-viewport that closed this issue Jun 6, 2014
@vvo fix(overlaps): fix for overlapping divs 16c00b9
@jdeniau
jdeniau commented Jun 6, 2014

:thumbsup:

@vvo vvo added a commit that referenced this issue Jun 6, 2014
@vvo 2.1.1
fixes #56
01327fe
@vvo
Owner
vvo commented Jun 6, 2014
> bower info lazyload
bower lazyload#*                cached git://github.com/vvo/lazyload.git#2.1.0
bower lazyload#*              validate 2.1.0 against git://github.com/vvo/lazyload.git#*
bower lazyload#*                   new version for git://github.com/vvo/lazyload.git#*
bower lazyload#*               resolve git://github.com/vvo/lazyload.git#*
bower lazyload#*              download https://github.com/vvo/lazyload/archive/2.1.1.tar.gz
bower lazyload#*               extract archive.tar.gz
bower lazyload#*              resolved git://github.com/vvo/lazyload.git#2.1.1

{
  name: 'lazyload',
  description: 'Image lazy loading',
  version: '2.1.1',
  main: 'lazyload.js',
  ignore: [
    '**/.*',
    'node_modules/',
    'bower_components/',
    'test/'
  ],
  dependencies: {
    'in-viewport': '~0.4.0'
  },
  homepage: 'https://github.com/vvo/lazyload'
}

Available versions:
  - 2.1.1
@vvo
Owner
vvo commented Jun 6, 2014

@jdeniau Can you test for yourself if it works?

@jdeniau
@jdeniau
jdeniau commented Oct 8, 2014

Oops, I took time to test it but the bug is fixed ;)

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.