Skip to content

Commit

Permalink
Merge pull request #214 from hlxsites/bug/model-image-2zoom
Browse files Browse the repository at this point in the history
Bug/model image 2zoom
  • Loading branch information
pardeepgera23 authored Dec 6, 2023
2 parents 534f4d2 + 15d4b2e commit f97c702
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion blocks/model-image/model-image.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@
max-height: 80vh;
overflow: auto;

@media only screen and (max-width: 860px) {
@media (max-width: 860px) {
width: calc(100vw - 100px);
}

@media (max-width: 768px) {
width: calc(100vw - 40px);
}

}
4 changes: 2 additions & 2 deletions blocks/model-image/model-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ export default function decorate(block) {
});
pictureTagForZoom.addEventListener('click', (e) => {
e.stopPropagation();
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': 'unset' });
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '200%' });
});
block.querySelector('.button.icon-search').addEventListener('click', (e) => {
e.stopPropagation();
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': 'unset' });
addStyles(pictureTagForZoom.querySelector('img'), { 'max-width': '200%' });
});
}

0 comments on commit f97c702

Please sign in to comment.