         expectedLabelSize.width = ceil(min(expectedLabelSize.width, 8192.0))
         // Adjust to own height (make text baseline match normal label)
         expectedLabelSize.height = bounds.size.height
-        
         return expectedLabelSize
     }
     

        
        case .RightLeft:
            homeLabelFrame = CGRectIntegral(CGRectMake(bounds.size.width - (expectedLabelSize.width + leadingBuffer), 0.0, expectedLabelSize.width, bounds.size.height))
            //awayLabelFrame = CGRectIntegral(CGRectMake(trailingBuffer, 0.0, expectedLabelSize.width, bounds.size.height))
            awayOffset = (expectedLabelSize.width + trailingBuffer)
            
            // Recompute the animation duration
            animationDuration = {
                if let rate = self.scrollRate {
                    //return CGFloat(fabs(self.awayLabelFrame.origin.x - self.homeLabelFrame.origin.x) / rate)
                    return fabs(awayOffset / rate)
                } else {
                    return self.scrollDuration ?? 7.0

            
            // Find when the lead label will be totally offscreen
            let offsetDistance = awayOffset
            let startFadeFraction = fabs((sublabel.bounds.size.width + leadingBuffer) / offsetDistance)
            // Find when the animation will hit that point
            let startFadeTimeFraction = timingFunction.durationPercentageForPositionPercentage(startFadeFraction, duration: totalDuration)
            let startFadeTime = delay + CGFloat(startFadeTimeFraction) * interval
