githubbub / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

addZoomListener in GraphicalView class Pinch zoom issue #379

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. GraphicalView graph = ChartFactory.getTimeChartView(context, 
                dataset, mRenderer,"HH:mm"); 
2. graph.addZoomListener(listener,false,true) 

What is the expected output? What do you see instead?
I expect to handle events caused by pinch zoom only.
I can't handle any zoom event. 

What version of the product binary library are you using?
achartengine-1.1.0

As I navigated to source code i found this in GraphicalView.class file

public void addZoomListener(ZoomListener listener, boolean onButtons, boolean 
onPinch) 
{
     if(onButtons)
     { 
                if(mZoomIn != null) 
                {  mZoomIn.addZoomListener(listener); 
                    mZoomOut.addZoomListener(listener);
                 }
                if(onPinch) mTouchHandler.addZoomListener(listener);
     }
 }

instead of for example 

public void addZoomListener(ZoomListener listener, boolean onButtons, boolean 
onPinch) 
{
     if(onButtons)
     { 
                if(mZoomIn != null) 
                {  mZoomIn.addZoomListener(listener); 
                    mZoomOut.addZoomListener(listener);
                 }
     }
     if(onPinch) mTouchHandler.addZoomListener(listener);
 }

Additionally - is there a possibility to create method which disables pinch 
zoom only?

Original issue reported on code.google.com by krzyszto...@gmail.com on 12 Dec 2013 at 9:06

GoogleCodeExporter commented 9 years ago
Thanks for reporting.

Original comment by dandrome...@gmail.com on 7 Jan 2014 at 11:06