Changeset 8286:54282791860b in orange


Ignore:
Timestamp:
06/01/11 12:03:23 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
4efff69da4b6c0c87f9594e264dd754cd237fb5d
Message:

axis title font used now, shift+middle button drag improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWGraph3D.py

    r8285 r8286  
    3434 
    3535        # TODO: other shapes 
     36        # TODO: move to center shortcut (maybe a GUI element?) 
    3637 
    3738        self.yaw = self.pitch = 0 
     
    137138 
    138139        ac = (self.x_axis[0] + self.x_axis[1]) / 2. 
    139         self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.XaxisTitle) 
     140        self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.XaxisTitle, font=self.axisTitleFont) 
    140141        ac = (self.y_axis[0] + self.y_axis[1]) / 2. 
    141         self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.YaxisTitle) 
     142        self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.YaxisTitle, font=self.axisTitleFont) 
    142143        ac = (self.z_axis[0] + self.z_axis[1]) / 2. 
    143         self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.ZaxisTitle) 
     144        self.renderText(ac[0], ac[1]-0.2, ac[2]-0.2, self.ZaxisTitle, font=self.axisTitleFont) 
    144145 
    145146        outwards = normalize(self.x_axis[0] - bb_center) 
     
    279280        dy = pos.y() - self.mouse_pos.y() 
    280281        if QApplication.keyboardModifiers() & Qt.ShiftModifier: 
    281           off = numpy.cross(self.center - self.camera, [0,1,0]) * (dx / self.move_factor) 
    282           self.center -= off 
     282          off_x = numpy.cross(self.camera, [0,1,0]) * (dx / self.move_factor) 
     283          #off_y = numpy.cross(self.camera, [1,0,0]) * (dy / self.move_factor) 
     284          # TODO: this incidentally works almost fine, but the math is wrong and should be fixed 
     285          self.center += off_x 
    283286        else: 
    284287          self.yaw += dx /  self.rotation_factor 
Note: See TracChangeset for help on using the changeset viewer.