Skip to content

Commit

Permalink
4.0.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.farkas committed May 15, 2017
1 parent f86b4cd commit 097a987
Show file tree
Hide file tree
Showing 27 changed files with 40 additions and 27 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 4.0.0-RC1
* make all plugins CommonJS compatible (thx to @claudiobmgrtnr and @jantimon)
* added `loadHidden` option(thx to @justinvoelker)
* added artdirection plugin (no documentation yet, but great)
* iOS 8.1 fixes has to loaded explicitly (not included in respimg plugin anymore)
* removed `picture` support for old FF 38-

## 2.0.0

* lazysizes core:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ Here the list of options:
* ``lazySizesConfig.srcsetAttr`` (default: ``"data-srcset"``): The attribute, which should be transformed to ``srcset``.
* ``lazySizesConfig.sizesAttr`` (default: ``"data-sizes"``): The attribute, which should be transformed to ``sizes``. Makes almost only makes sense with the value ``"auto"``. Otherwise the ``sizes`` attribute should be used directly.
* ``lazySizesConfig.customMedia`` (default: ``{}``): The ``customMedia`` option object is an alias map for different media queries. It can be used to separate/centralize your multiple specific media queries implementation (layout) from the ``source[media]`` attribute (content/structure) by creating labeled media queries. (See also the [custommedia extension](plugins/custommedia)).
* ``lazySizesConfig.loadHidden`` (default: ``true``): Wether to load `visibility: hidden` elements.
```html
<script>
window.lazySizesConfig = window.lazySizesConfig || {};
Expand Down
4 changes: 3 additions & 1 deletion lazysizes-umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@
(eLright = rect.right) >= elemNegativeExpand * hFac &&
(eLleft = rect.left) <= eLvW &&
(eLbottom || eLright || eLleft || eLtop) &&
(lazySizesConfig.loadHidden || getCSS(lazyloadElems[i], 'visibility') != 'hidden') &&
((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){
unveilElement(lazyloadElems[i]);
loadedSomething = true;
Expand Down Expand Up @@ -655,7 +656,8 @@
init: true,
expFactor: 1.5,
hFac: 0.8,
loadMode: 2
loadMode: 2,
loadHidden: true,
};

lazySizesConfig = window.lazySizesConfig || window.lazysizesConfig || {};
Expand Down
4 changes: 2 additions & 2 deletions lazysizes-umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lazysizes.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
(eLright = rect.right) >= elemNegativeExpand * hFac &&
(eLleft = rect.left) <= eLvW &&
(eLbottom || eLright || eLleft || eLtop) &&
(lazySizesConfig.loadHidden || getCSS(lazyloadElems[i], 'visibility') != 'hidden') &&
((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4)) || isNestedVisible(lazyloadElems[i], elemExpand))){
unveilElement(lazyloadElems[i]);
loadedSomething = true;
Expand Down Expand Up @@ -652,7 +653,8 @@
init: true,
expFactor: 1.5,
hFac: 0.8,
loadMode: 2
loadMode: 2,
loadHidden: true,
};

lazySizesConfig = window.lazySizesConfig || window.lazysizesConfig || {};
Expand Down
Loading

0 comments on commit 097a987

Please sign in to comment.