Ignore:
Timestamp:
Mar 26, 2013, 1:33:48 AM (7 years ago)
Author:
ldelgass
Message:

Fix label disappearing at first tick: if axis min value is divisible by
tick delta, set tick labels starting at minimum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/vtkRpCubeAxesActor.cpp

    r3583 r3586  
    19361936
    19371937void vtkRpCubeAxesActor::AdjustTicksComputeRange(vtkRpAxisActor *axes[NUMBER_OF_ALIGNED_AXIS],
    1938     double boundsMin, double boundsMax)
     1938                                                 double boundsMin, double boundsMax)
    19391939{
    19401940  double sortedRange[2], range;
     
    20082008    // Figure out the first major tick locations, relative to the
    20092009    // start of the axis.
    2010     if (sortedRange[0] <= 0.)
     2010    if (this->FFix(sortedRange[0]*(1./major)) == sortedRange[0]*(1./major))
     2011      {
     2012      majorStart = sortedRange[0];
     2013      }
     2014    else if (sortedRange[0] <= 0.)
    20112015      {
    20122016      majorStart = major*(this->FFix(sortedRange[0]*(1./major)) + 0.);
     
    20332037  // Figure out the first minor tick locations, relative to the
    20342038  // start of the axis.
    2035   if (sortedRange[0] <= 0.)
     2039  if (this->FFix(sortedRange[0]*(1./minor)) == sortedRange[0]*(1./minor))
     2040    {
     2041    minorStart = sortedRange[0];
     2042    }
     2043  else if (sortedRange[0] <= 0.)
    20362044    {
    20372045    minorStart = minor*(this->FFix(sortedRange[0]*(1./minor)) + 0.);
Note: See TracChangeset for help on using the changeset viewer.