Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: when the img in ion-slide, double click the picture,the picture will be scaled #18035

Closed
coloz opened this issue Apr 15, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@coloz
Copy link

commented Apr 15, 2019

Bug Report

Ionic version:
[x] 4.x

Current behavior:
when the img in ion-slide, double click the picture,the picture will be scaled,img will be added with a style attribute.
for example:

<img _ngcontent-c11="" src="assets/img/devices/diyarduino.png" style="transition-duration: 300ms; transform: translate3d(0px, 0px, 0px) scale(3);">

Expected behavior:

Normally, no zoom in and out of pictures

Steps to reproduce:
Use the following code,then double click the picture

Related code:

  <ion-slides pager="true" [options]="slideOpts">
    <ion-slide>
        <img src="/assets/shapes.svg"/>
    </ion-slide>
    <ion-slide>
        <img src="/assets/shapes.svg"/>
    </ion-slide>
    <ion-slide>
        <img src="/assets/shapes.svg"/>
    </ion-slide>
  </ion-slides>

Ionic info:

Ionic:
   ionic (Ionic CLI)             : 4.12.0 (C:\Users\clz\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.2.0
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.4.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)

System:

   NodeJS : v10.15.1 (D:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

@ionitron-bot ionitron-bot bot added the triage label Apr 15, 2019

@coloz coloz changed the title bug: when the img in ion-slide, double click the picture,picture will bug: when the img in ion-slide, double click the picture,the picture will be scaled Apr 15, 2019

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Apr 15, 2019

Hi there,

Thanks for the issue. Zooming is enabled by default. You can disable the double tap functionality via the options prop:

slideOpts = {
  ...
  zoom: {
    toggle: false
  }
}

Can you confirm whether or not that works for you? Thanks!

@coloz

This comment has been minimized.

Copy link
Author

commented Apr 15, 2019

Thank you so much.

@coloz coloz closed this Apr 15, 2019

@ionitron-bot ionitron-bot bot removed the needs: reply label Apr 15, 2019

@ionitron-bot

This comment has been minimized.

Copy link

commented May 15, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 15, 2019

mlynch added a commit that referenced this issue Jun 3, 2019

@mlynch

This comment has been minimized.

Copy link
Member

commented Jun 3, 2019

Default is set to false now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.