mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-13 08:10:08 +01:00
Merge pull request #2795 from jmoraleda/plotcanvas-scroll-left-down
Add ScrollLeft and ScrollDown to PlotCanvas to complement already-ext…
This commit is contained in:
@@ -1456,6 +1456,10 @@ class PlotCanvas(wx.Panel):
|
||||
xAxis = (xAxis[0] + units, xAxis[1] + units)
|
||||
self._Draw(graphics, xAxis, yAxis)
|
||||
|
||||
def ScrollLeft(self, units):
|
||||
"""Move view left number of axis units."""
|
||||
self.ScrollRight(-units)
|
||||
|
||||
def ScrollUp(self, units):
|
||||
"""Move view up number of axis units."""
|
||||
self.last_PointLabel = None # reset pointLabel
|
||||
@@ -1463,6 +1467,10 @@ class PlotCanvas(wx.Panel):
|
||||
graphics, xAxis, yAxis = self.last_draw
|
||||
yAxis = (yAxis[0] + units, yAxis[1] + units)
|
||||
self._Draw(graphics, xAxis, yAxis)
|
||||
|
||||
def ScrollDown(self, units):
|
||||
"""Move view down number of axis units."""
|
||||
self.ScrollUp(-units)
|
||||
|
||||
def GetXY(self, event):
|
||||
"""Wrapper around _getXY, which handles log scales"""
|
||||
|
||||
Reference in New Issue
Block a user