Skip to content

Commit

Permalink
Merge pull request #1 from hurzl/patch-3
Browse files Browse the repository at this point in the history
zoom big preview by shift + key
  • Loading branch information
hurzl committed Mar 5, 2012
2 parents 9167dfb + 6fb50be commit 5c22914
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions gviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ def mouse(self,event):
else:
event.Skip()


def key(self, event):
x=event.GetKeyCode()
if event.ShiftDown():
cx,cy=self.p.translate
if x==wx.WXK_UP:
self.p.zoom(cx,cy,1.2)
if x==wx.WXK_DOWN:
self.p.zoom(cx,cy,1/1.2)
else:
if x==wx.WXK_UP:
self.p.layerup()
if x==wx.WXK_DOWN:
self.p.layerdown()
#print x
if x==wx.WXK_UP:
self.p.layerup()
if x==wx.WXK_DOWN:
self.p.layerdown()

#print p.lines.keys()
def zoom(self, event):
Expand Down

0 comments on commit 5c22914

Please sign in to comment.