Possibility to fit background and some improvements #126

Open
wants to merge 4 commits into
from

Conversation

Projects
None yet
4 participants
@vladmu

vladmu commented Aug 23, 2012

Changes Log:

Improvements:

  1. Added 'fit' option so it is possible now to fit background image into
    browser viewport
  2. Added callback calling into resize.backstretch event
  3. Image's object is now accessible inside callback via 'this' pointer

Fixes:

  1. If browser supports fixed position try to use the window's innerWidth
    first like used for height before
  2. Ommited unnecessary useWindowInnerHeight variable
  3. Correct calculating of backgroung dimension for horisontal and
    vertical viewport orientation
  4. Correct centering X or Y, it is not related now from image ratio
  5. Replaced double call of image css setting in _adjustBG with one by
    extending bgCSS properties
Added fit background option and some improvements
Changes Log:

Improvements:
1. Added 'fit' option so it is possible now to fit background image into
browser viewport
2. Added callback calling into resize.backstretch event
3. Image's object is now accessible inside callback via 'this' pointer

Fixes:
1. If browser supports fixed position try to use the window's innerWidth
first like used for height before
2. Ommited unnecessary useWindowInnerHeight variable
3. Correct calculating of backgroung dimension for horisontal and
vertical viewport orientation
4. Correct centering X or Y, it is not related now from image ratio
5. Replaced double call of image css setting in _adjustBG with one by
extending bgCSS properties
@srobbin

This comment has been minimized.

Show comment Hide comment
@srobbin

srobbin Aug 23, 2012

Thanks, Vlad. I appreciate the pull request and suggestions. Currently, I'm in the midst of recoding Backstretch from the ground up, so I won't be able to merge the changes, but I will look to incorporate them in the new version.

Cheers,
Scott

Thanks, Vlad. I appreciate the pull request and suggestions. Currently, I'm in the midst of recoding Backstretch from the ground up, so I won't be able to merge the changes, but I will look to incorporate them in the new version.

Cheers,
Scott

This comment has been minimized.

Show comment Hide comment
@vladmu

vladmu Aug 23, 2012

Owner

No problem. I just added possibility to fit background and main goal is to share this with you and the people, so maybe this can be useful.

In waiting of your new version of the awesome plugin.

Regards,
Vlad

Owner

vladmu replied Aug 23, 2012

No problem. I just added possibility to fit background and main goal is to share this with you and the people, so maybe this can be useful.

In waiting of your new version of the awesome plugin.

Regards,
Vlad

@nicooprat

This comment has been minimized.

Show comment Hide comment
@nicooprat

nicooprat Oct 9, 2012

This fit option would be really helpful ! (like background-size: cover / container).

This fit option would be really helpful ! (like background-size: cover / container).

@orti2000

This comment has been minimized.

Show comment Hide comment
@orti2000

orti2000 Oct 10, 2012

yeah, option 'fit' would be great!

yeah, option 'fit' would be great!

vladmu added some commits Mar 29, 2016

Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	jquery.backstretch.js
Improve fadeIn/Out working on slideshow when 'fit' option is true; re…
…create detailed example and expand readme.md with new option 'fade'
@vladmu

This comment has been minimized.

Show comment Hide comment
@vladmu

vladmu Mar 29, 2016

Hi Scott! I'm just refreshing my fork with the last version of this plugin. So if you still support this you could merge this pull request and expand your plugin with FIT feature. Anyway my fork now has no conflicts and is actualized with last state of your plugin.

vladmu commented Mar 29, 2016

Hi Scott! I'm just refreshing my fork with the last version of this plugin. So if you still support this you could merge this pull request and expand your plugin with FIT feature. Anyway my fork now has no conflicts and is actualized with last state of your plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment