Skip to content

Commit

Permalink
fixed zoomed image mobile issuel
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinaykumargujja committed Dec 4, 2023
1 parent 4f69b25 commit a890183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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);
}

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

0 comments on commit a890183

Please sign in to comment.