~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to enthought/chaco/tools/tracking_zoom.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-04-06 19:03:54 UTC
  • mfrom: (7.2.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110406190354-rwd55l2ezjecfo41
Tags: 3.4.0-2
d/rules: fix pyshared directory path (Closes: #621116)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
"""
3
3
 
4
4
# Chaco imports
5
 
from enthought.chaco.tools.api import SimpleZoom
6
 
 
7
 
 
8
 
class TrackingZoom(SimpleZoom):
 
5
from zoom_tool import ZoomTool
 
6
 
 
7
class TrackingZoom(ZoomTool):
9
8
    """ Allows the user to zoom in or out on a plot that is using tracking.
10
9
    
11
10
    The **default_state** of the data range determines the tracking behavior.
20
19
        """ Handles the mouse wheel being used when the tool is in the 'normal'
21
20
        state.
22
21
        
23
 
        Overrides SimpleZoom.
 
22
        Overrides ZoomTool
24
23
        """
25
24
        if self.enable_wheel and event.mouse_wheel != 0:
26
25
            if event.mouse_wheel > 0: