Skip to content

Commit

Permalink
Merge pull request #42 from theohbrothers/fix/gallery-fix-performance…
Browse files Browse the repository at this point in the history
…-issue-in-stretchx-and-stretchy

Fix (gallery): Fix performance issue in stretchx and stretchy
  • Loading branch information
leojonathanoh authored Oct 28, 2022
2 parents a32846b + b18c1ae commit 54493fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webize
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ cat - >> "$INDEX_HTM" <<'EOF'
};
var stretchx = function() {
const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
for (var i = 0; i < images.length; i++) {
images[i].parentNode.style.display = "inline-block";
images[i].parentNode.style.display = "block";
images[i].parentNode.style.width = "100vw";
images[i].parentNode.style.height = "auto";
images[i].style.width = "100%";
Expand All @@ -474,8 +475,9 @@ cat - >> "$INDEX_HTM" <<'EOF'
};
var stretchy = function() {
const viewportHeight = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
for (var i = 0; i < images.length; i++) {
images[i].parentNode.style.display = "inline-block";
images[i].parentNode.style.display = "block";
images[i].parentNode.style.width = "100vw";
images[i].parentNode.style.height = "100vh";
images[i].style.width = "auto";
Expand Down

0 comments on commit 54493fc

Please sign in to comment.