3988f5c989e92a941ab0b7b99765b21514b6dd64,enthought/chaco/tools/better_zoom.py,BetterZoom,zoom_in,#BetterZoom#Any#,56
Before Change
if factor == 0:
factor = self.zoom_factor
if self.axis != "value":
self._zoom_in_mapper(self.component.index_mapper, factor)
self._index_factor *= factor
if self.axis != "index":
self._zoom_in_mapper(self.component.value_mapper, factor)
self._value_factor *= factor
self._append_state((self._index_factor, self._value_factor))
def zoom_out(self, factor=0):
if factor == 0:
factor = self.zoom_factor
After Change
// public interface
//--------------------------------------------------------------------------
def zoom_in(self, factor=0):
if factor == 0:
factor = self.zoom_factor
new_index_factor = self._index_factor * factor
new_value_factor = self._value_factor * factor
if self.axis == "value":
new_index_factor = self._index_factor
elif self.axis == "index":
new_value_factor = self._value_factor
zoom_state = ZoomState((self._index_factor, self._value_factor),
(new_index_factor, new_value_factor))
zoom_state.apply(self)
self._append_state(zoom_state)
def zoom_out(self, factor=0):
if factor == 0:
factor = self.zoom_factor
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances
Project Name: enthought/chaco
Commit Name: 3988f5c989e92a941ab0b7b99765b21514b6dd64
Time: 2009-12-16
Author: bhendrix@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/tools/better_zoom.py
Class Name: BetterZoom
Method Name: zoom_in
Project Name: enthought/chaco
Commit Name: 3988f5c989e92a941ab0b7b99765b21514b6dd64
Time: 2009-12-16
Author: bhendrix@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/tools/better_zoom.py
Class Name: BetterZoom
Method Name: zoom_in_x
Project Name: enthought/chaco
Commit Name: 3988f5c989e92a941ab0b7b99765b21514b6dd64
Time: 2009-12-16
Author: bhendrix@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/tools/better_zoom.py
Class Name: BetterZoom
Method Name: zoom_in_y