/[gzz]/gzz/gzz/view/buoy/pagespanNodes.py
ViewVC logotype

Diff of /gzz/gzz/view/buoy/pagespanNodes.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by tjl, Fri Feb 7 08:10:46 2003 UTC revision 1.19 by tjl, Fri Feb 7 08:15:03 2003 UTC
# Line 77  class PageSpanMainNode(BuoyViewMainNode) Line 77  class PageSpanMainNode(BuoyViewMainNode)
77          vs.coords.getSqSize(into, size)          vs.coords.getSqSize(into, size)
78          print "SQ:", size[0], size[1]          print "SQ:", size[0], size[1]
79                    
80          self.scale = size[1] / self.layout.h          self.scale = size[1] / self.layout.h * .03
81          self.ctr = vs.translateCS(into, "ORIGIN", .5 * size[0],          self.ctr = vs.translateCS(into, "ORIGIN", .5 * size[0],
82                      .5 * size[1])                      .5 * size[1])
83          self.scale = vs.scaleCS(self.ctr, "SCALE", self.scale, self.scale)          self.scale = vs.scaleCS(self.ctr, "SCALE", self.scale, self.scale)
# Line 110  class PageSpanMainNode(BuoyViewMainNode) Line 110  class PageSpanMainNode(BuoyViewMainNode)
110    
111      def mouse(self, mouseEvent, oldVS):      def mouse(self, mouseEvent, oldVS):
112          if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED:          if mouseEvent.getID() == mouseEvent.MOUSE_CLICKED:
113              print "MOUSE PSPMAIN ",mouseEvent              # print "MOUSE PSPMAIN ",mouseEvent
114              size[0] = mouseEvent.getX()              size[0] = mouseEvent.getX()
115              size[1] = mouseEvent.getY()              size[1] = mouseEvent.getY()
116              size[2] = 0              size[2] = 0
117              tmp = jarray.zeros(3, 'f')              tmp = jarray.zeros(3, 'f')
118              oldVS.coords.inverseTransformPoints3(self.ctr, size, tmp)              oldVS.coords.inverseTransformPoints3(self.ctr, size, tmp)
119              print "Ev - ctr: ",mouseEvent, tmp[0], tmp[1], tmp[2]              # print "Ev - ctr: ",mouseEvent, tmp[0], tmp[1], tmp[2]
120              oldVS.coords.inverseTransformPoints3(self.scale, size, tmp)              oldVS.coords.inverseTransformPoints3(self.scale, size, tmp)
121              print "Ev - scale: ",mouseEvent, tmp[0], tmp[1], tmp[2]              # print "Ev - scale: ",mouseEvent, tmp[0], tmp[1], tmp[2]
122    
123              oldVS.coords.inverseTransformPoints3(self.shift, size, size)              oldVS.coords.inverseTransformPoints3(self.shift, size, size)
124              print "Ev: ",size[0], size[1], size[2]              # print "Ev: ",size[0], size[1], size[2]
125              print "Self.xy was",self.x,self.y              # print "Self.xy was",self.x,self.y
126              oldVS.coords.transformPoints3(self.shift, size, tmp)              oldVS.coords.transformPoints3(self.shift, size, tmp)
127              print "Retransformed:", tmp[0], tmp[1], tmp[2]              # print "Retransformed:", tmp[0], tmp[1], tmp[2]
128              self.x = size[0]              self.x = size[0]
129              self.y = size[1]              self.y = size[1]
130              if self.x < 0: self.x = 0              if self.x < 0: self.x = 0
131              if self.y < 0: self.y = 0              if self.y < 0: self.y = 0
132              if self.x > self.layout.w: self.x = self.layout.w              if self.x > self.layout.w: self.x = self.layout.w
133              if self.y > self.layout.h: self.y = self.layout.h              if self.y > self.layout.h: self.y = self.layout.h
134              self.setShift(oldVS)              # self.setShift(oldVS)
135              gzz.client.AbstractUpdateManager.chg()              gzz.client.AbstractUpdateManager.chg()
136              return 0              return 0
137            return 0
138      def keystroke(self, key):      def keystroke(self, key):
139          pass          pass
140    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26