Changeset d5a792a in sasview
- Timestamp:
- Jan 7, 2009 3:44:22 PM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 030873e
- Parents:
- d054809
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/boxSlicer.py
rd054809 rd5a792a 149 149 150 150 self.main_line.update() 151 self.left_line.update( mline= self.main_line,151 self.left_line.update( 152 152 xmin= self.xmin, 153 153 xmax= self.xmin, … … 155 155 ymax=self.ymax, 156 156 translation=True) 157 self.right_line.update( mline= self.main_line,157 self.right_line.update( 158 158 xmin= self.xmax, 159 159 xmax= self.xmax, … … 166 166 if self.left_line.has_move: 167 167 print "left has moved" 168 self.left_line.update(mline= self.main_line, 169 xmin= self.xmin, 170 translation=True) 171 self.right_line.update(mline= self.main_line, 172 xmin=-1*self.xmin, 173 translation=True) 168 self.left_line.update() 169 self.right_line.update(opline= self.left_line ) 174 170 """ 175 171 self.top_line.update( xmin= self.left_line.xmax ,xmax= self.right_line.xmax, … … 180 176 if self.right_line.has_move: 181 177 print "right has moved" 182 self.right_line.update(mline= self.main_line, 183 xmin= self.xmax, 184 translation=True) 185 self.left_line.update(mline= self.main_line, 186 xmin=-1*self.xmax, 187 translation=True) 178 self.right_line.update() 179 self.left_line.update(opline= self.right_line ) 188 180 """ 189 181 self.top_line.update( xmin= self.left_line.xmax ,xmax= self.right_line.xmax, … … 508 500 self.deltay=0 509 501 510 self.clickx=0 511 self.clicky=0 502 512 503 self.clickxf=0 513 504 self.clickyf=0 … … 555 546 return 0 556 547 557 def update(self,xmin=None,xmax=None,ymin=None, ymax=None, mline=None,translation=False):548 def update(self,xmin=None,xmax=None,ymin=None, ymax=None, opline=None,translation=False): 558 549 """ 559 550 Draw the new roughness on the graph. 560 551 """ 561 552 if opline !=None: 553 self.line.set(xdata=[-1*opline.x1,-1*opline.x2], 554 ydata=[-opline.y1,-opline.y2]) 555 return 562 556 if xmin== None: 563 557 xmin= self.L_width … … 573 567 574 568 self.line.set(xdata=[self.x1,self.x2], ydata=[self.y1,self.y2]) 575 569 if opline !=None: 570 self.line.set(xdata=[-1*self.opline.x1,-1*self.opline.x2], 571 ydata=[self.opline.y1,self.opline.y2]) 572 return 576 573 if translation: 577 self.deltax= self.clickxf +self.clickx 578 self.deltay= self.clickyf +self.clicky 579 print"translation deltax deltay", self.deltax, self.deltay 580 self.x1=self.x1 +self.deltax 581 self.y1=self.y1+ self.deltay 582 self.x2=self.x2+ self.deltax 583 self.y2=self.y2+self.deltay 574 #if xmin !=None: 575 # self.L_width=xmin 576 self.x1= self.mline.x1 + self.L_width*math.cos(math.pi/2 - self.mline.theta) 577 self.x2= self.mline.x2 + self.L_width*math.cos(math.pi/2 - self.mline.theta) 578 self.y1= self.mline.y1 - self.L_width*math.sin(math.pi/2 - self.mline.theta) 579 self.y2= self.mline.y2 - self.L_width*math.sin(math.pi/2 - self.mline.theta) 580 581 print"translation x1, x2,y1,y2",self.x1, self.x2,self.y1,self.y2 584 582 self.line.set(xdata=[self.x1,self.x2], ydata=[self.y1,self.y2]) 585 583 def save(self, ev): … … 608 606 self.xmin = self.save_xmin 609 607 self.xmax = self.save_xmax 610 self.ymin =self.save_ymin611 self.ymax =self.save_ymax608 self.ymin = self.save_ymin 609 self.ymax = self.save_ymax 612 610 613 611 … … 616 614 Process move to a new position, making sure that the move is allowed. 617 615 """ 618 619 616 self.has_move=True 617 self.L_width=x 618 619 620 620 self.base.base.update() 621 621
Note: See TracChangeset
for help on using the changeset viewer.