Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 1.34 KB

2021-10-12-gallery-tall-images-issue-aspect-ratio-zoom-config-and-magnifier-over-gallery-config.md

File metadata and controls

17 lines (17 loc) · 1.34 KB
title issue author author_email
Gallery image aspect ratio zoom config (tall images fix) and magnifier over gallery config
NEXT-14809
Robert Rypula

Administration

  • Added two parameters magnifierOverGallery and keepAspectRatioOnZoom to administration/src/module/sw-cms/elements/image-gallery/index.js.
  • Added default value preset to initConfig method at administration/src/module/sw-cms/elements/image-gallery/config/index.js.
  • Added block with new checkboxes at administration\src\module\sw-cms\elements\image-gallery\config\sw-cms-el-config-image-gallery.html.twig.
  • Added new snippets related to checkboxes to administration\src\module\sw-cms\snippet\*.json

Storefront

  • Added new parameter keepAspectRatioOnZoom to the plugin storefront\src\plugin\magnifier\magnifier.plugin.js
  • Changed methods _setZoomImageSize(...), calculateZoomImageBackgroundPosition(...) and _getOverlaySize(....) to include new keepAspectRatioOnZoom parameter at storefront\src\plugin\magnifier\magnifier.plugin.js
  • Changed styles - due to bug the overlay was hidden even the magnifier area was not the gallery at storefront\src\scss\component\_cms-element.scss
  • Added logic that consumes parameters from the administration and passes them to the magnifier plugin at storefront\element\cms-element-image-gallery.html.twig