- Timestamp:
- Sep 15, 2016 8:33:57 AM (8 years ago)
- Branches:
- 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
- Children:
- d6e36e44
- Parents:
- 813220f
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (08/15/16 11:21:17)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (09/15/16 08:33:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/PlotPanel.py
r0d0aa40 r6d4cf68 150 150 #List of texts currently on the plot 151 151 self.textList = [] 152 self.selectedText = None 152 153 #User scale 153 154 if xtransform != None: … … 352 353 self.leftdown = True 353 354 ax = event.inaxes 355 for text in self.textList: 356 if text.contains(event)[0]: # If user has clicked on text 357 self.selectedText = text 358 return 359 354 360 if ax != None: 355 361 self.xInit, self.yInit = event.xdata, event.ydata … … 373 379 self.mousemotion = False 374 380 self.leftup = True 381 self.selectedText = None 375 382 376 383 #release the legend … … 448 455 self._on_legend_motion(event) 449 456 return 457 458 if self.leftdown and self.selectedText is not None: 459 # User has clicked on text and is dragging 460 ax = event.inaxes 461 if ax != None: 462 # Only move text if mouse is within axes 463 self.selectedText.set_position((event.xdata, event.ydata)) 464 self._dragHelper(0, 0) 465 else: 466 # User has dragged outside of axes 467 self.selectedText = None 468 return 469 450 470 if self.enable_toolbar: 451 471 #Disable dragging without the toolbar to allow zooming with toolbar
Note: See TracChangeset
for help on using the changeset viewer.