Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser width #74

Closed
ivansieder-xx opened this issue Jan 12, 2016 · 1 comment
Closed

Browser width #74

ivansieder-xx opened this issue Jan 12, 2016 · 1 comment

Comments

@ivansieder-xx
Copy link

Instead of forcing window.screen.width (for the breakpoints), add the possibility to drop this 3 options in when initializing the plugin:

  • window.screen.width - Complete screen width
  • document.body.offsetWidth - Width of browser window, as someone might have the browser resized and not at full width of the Monitor
  • element.parentElement.offsetWidth - As not all images might be at full width (for this you might also pass along the parent when iterating over the elements)
@dinbror
Copy link
Owner

dinbror commented Jan 13, 2016

Hey @ivansieder

So you want the possibility to control what the breakpoints should adjust against instead of always window.screen.width?
The reason why I’m looking at the screen width and not the browser width is that I don’t want to load multiple image sources for the same image when you resize (multiple server request per image). And if you have a big screen but the start width of your browser window is something small I don’t want to upscale a low res image if you resize it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants