ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

zoom in ion-scroll not working in beta 2.0

Open yelhouti opened this issue 10 years ago • 28 comments

Short description of the problem:

zoom option in <ion-scroll> is not working in beta 2.0m also the scrollY is poorly working on iOS.

What behavior are you expecting?

I'm expecting the zoom to work when I add zoom="true" and maxZoom="2" to <ion-scroll>

Steps to reproduce:

  1. use the code provided below (modification of demo)
  2. pinch the screen

this the code from the demo modified

<ion-content>
    <ion-scroll maxZoom="2" zoom="true" scrollX="true" scrollY="true" style="width: 100%; height: 100%">
        <div class="map-div"></div>
    </ion-scroll>
</ion-content>

<style>
    .map-div {
        width: 2600px;
        height: 1400px;
        background: url('./map.jpeg') no-repeat;
    }
</style>

Ionic Version: 2.0

Browser & Operating System: iOS / Chrome

Run ionic info from terminal/cmd prompt:

Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.17
Ionic App Lib Version: 2.0.0-beta.8
ios-deploy version: 1.8.5 
ios-sim version: 5.0.1 
OS: Mac OS X El Capitan
Node Version: v4.3.1
Xcode version: Xcode 7.2.1 Build version 7C1002 

yelhouti avatar Mar 03 '16 18:03 yelhouti

Hello thanks for opening an issue with us! Since this issue could be considered a duplicate of the two issues referenced above I will be closing this issue. Please feel free to continue the conversation on this issue over there! Thanks again!

jgw96 avatar Mar 23 '16 15:03 jgw96

The closed one issue is about Ionic1 and not Ionic2. Why have u closed that? It's still not working for Ionic2

arsenslyusarchuk avatar Jul 23 '16 12:07 arsenslyusarchuk

@jgw96 Could you guys stop closing issues so quickly? The issue is not resolved. The issue you linked to is for Ionic 1. It is still broken in Ionic 2

iRoachie avatar Oct 16 '16 16:10 iRoachie

@manucorporat @jgw96 Can we get an update from the team on the progress of this? I see on this issue #6482 it was removed from the milestone

iRoachie avatar Oct 16 '16 19:10 iRoachie

@iRoachie I am not sure this feature will make it before 2.0 final release. But I agree, <ion-scroll> needs some love, it has been abandoned.

I have started cleaning up the code, not sure how to implement the zoom yet (maybe hammer? + scale3d), I have to talk with the team.

manucorporat avatar Oct 16 '16 19:10 manucorporat

@manucorporat Could we at least put a note in the docs saying it doesn't work currently? I tried a workaround using (pan) event;

const scale = e.srcEvent.scale;
const newWidth = scale * 100;

Only thing is that the pan event fires after the pinch, so it's a delayed zoom

iRoachie avatar Oct 16 '16 19:10 iRoachie

Any way this could make it to the next milestone?

zakton5 avatar Dec 06 '16 13:12 zakton5

Hi, any news?

iliagerman avatar Dec 27 '16 16:12 iliagerman

Looks like there are a lot of people experiencing this problem, but none of them have been able to find a solution to it.

The latest thing I found comes from this repo: https://github.com/nikini/ionic-gallery-modal/tree/master/src

It implements a custom zoomable-image, which seems to work fine. Cons are that its complexity is quite high if you need to build it on your own. Also, this must be supported in Ionic2, so eventually it might change.

If anybody has something better, please share!

diegofal avatar Jan 31 '17 09:01 diegofal

@jgw96 have there been any updates made for a solution to this issue? (following your reference over from issue #6788 )

kevryan2 avatar May 10 '17 03:05 kevryan2

@jgw96 @manucorporat @brandyscarney Why do bugs in core features (zooming, virtual scroll, etc.) keep getting ignored. Ionic team, you are doing great work, but please take some time to fix these core issues that prevent many people from creating production ready applications.

@manucorporat even said 8 months ago that this bug needed some serious attention...

zakton5 avatar Jun 06 '17 13:06 zakton5

Any news on this issue? or there is another solution?

ngjonnathan avatar Aug 03 '17 18:08 ngjonnathan

Of course not. I'll probably attempt to make a PR for this soon, as I really need it.

zakton5 avatar Aug 30 '17 19:08 zakton5

Please fix this Ionic Team, it is imperative.

After 3 months of development of an important app in a team for a big corporation we are starting to regret our framework choice, from poor documentation to bugs like this.

594727294 avatar Sep 08 '17 20:09 594727294

Hi ionic team,

Please, you fix this, we are waiting a lot of time... I´m also starting to regret of this framework, thanks.

jmesao avatar Sep 11 '17 08:09 jmesao

+1

leonardosalles avatar Sep 22 '17 18:09 leonardosalles

This framework is making hybrid look bad. This is a fundamental feature and yet it isn't working?

I'm starting to regret this choice of tech stack.

Over a year, guys. Over a year.

christianwico avatar Oct 03 '17 04:10 christianwico

I know you're all volunteers and I'm sorry you have to read some of these comments, Ionic Team. But I know that I definitely need this as well :( 👍

azimuthdeveloper avatar Oct 18 '17 13:10 azimuthdeveloper

Could you please put the same effort on this issue as you're putting into the CLI? Thank you.

ghost avatar Oct 26 '17 20:10 ghost

My guess is the Ionic team is focused on Ionic 4 in which all components will be rewritten as Stencil components so Ionic 2/3 issues are getting neglected. Although if this is the case it would be nice for it to be communicated vs being left hanging.

Looking at the scroll component it's pretty minimal and a lot of the code zoom, maxZoom, and addScrollEventListener is unused throught the codebase. It's probably best to submit an PR that fixes this issue or implement a custom component while we wait for the Stencil release of Ionic and hope that the issue is no longer present.

adamduren avatar Nov 06 '17 20:11 adamduren