Problem/Motivation

The module does not allow configuring the zoom option from the SwiperJS library.

Proposed resolution

Please add the zoom option to the module's configuration form and update the schema and default configuration YAML files accordingly.

Object with zoom parameters or boolean true to enable with default settings

const swiper = new Swiper('.swiper', {
  zoom: <Object>{
    maxRatio: <integer>5,
  }|<boolean>true,
});

Demo: https://swiperjs.com/demos#zoom
API docs: https://swiperjs.com/swiper-api#param-zoom

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sebastix created an issue. See original summary.

bbu23’s picture

Version: 2.0.x-dev » 2.1.x-dev

Hi, thanks for reporting the feature request.

sebastix’s picture

Assigned: Unassigned » sebastix

I need it for a client project, so I'm going to start build this feature.

sebastix’s picture

Zoom options in the Swiper template config form:
Zoom options

Demo:
Demo zoom

sebastix’s picture

I've pushed the changes to https://git.drupalcode.org/issue/swiper_formatter-3554570/-/tree/3554570.... FYI this MR will conflict with MR#24.

I have not fully tested the zoom options in every format (the dialog for example) yet. But this initial push of the code is ready for a review.

sebastix’s picture

Status: Active » Needs review
bbu23’s picture

Status: Needs review » Needs work

Thanks for the detailed information. Could you please open an MR on this ticket even if it conflicts with other existing MRs? In order for us & others to review, there has to be an MR. Thank you!

sebastix’s picture

Normally when I push changes to a issue branch, there is a MR created automatically. In this case, no MR was created. So I'm looking how to create that MR. Can't find how. Am I missing something?

bbu23’s picture

Idk about automatic MRs, I've never experienced something like that in here. I always create my MRs manually.

You should be able to create the MR here: https://git.drupalcode.org/issue/swiper_formatter-3554570/-/compare/2.1.... by clicking on the "Create merge request" button.

sebastix’s picture

sebastix’s picture

Status: Needs work » Needs review
bbu23’s picture

Assigned: sebastix » bbu23

  • bbu23 committed 4a230e3e on 2.1.x
    test: #3554570 Add Kernel test for zoom options
    

  • bbu23 committed 9c9c54c6 on 2.1.x
    test: #3554570 Add update path test for zoom options post_update
    

bbu23’s picture

Assigned: bbu23 » Unassigned
Status: Needs review » Fixed

Thx, this will be available in 2.1.0

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sebastix’s picture

Cool, you're welcome!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.