reordered conditionals, moved beta things to beta header file

This commit is contained in:
rcancro
2016-02-24 08:06:10 -08:00
parent 878fedd8f3
commit 8dbc8b7df4
3 changed files with 14 additions and 13 deletions

View File

@@ -15,4 +15,16 @@
*/
@property (nonatomic, copy) NSArray *pointSizeScaleFactors;
#pragma mark - ASTextKit Customization
/**
A block to provide a hook to provide a custom NSLayoutManager to the ASTextKitRenderer
*/
@property (nonatomic, copy) NSLayoutManager * (^layoutManagerCreationBlock)(void);
/**
A block to provide a hook to provide a NSTextStorage to the Text Kit's layout manager.
*/
@property (nonatomic, copy) NSTextStorage * (^textStorageCreationBlock)(NSAttributedString *attributedString);
@end

View File

@@ -213,17 +213,6 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) {
*/
@property (nonatomic, assign) BOOL passthroughNonlinkTouches;
#pragma mark - ASTextKit Customization
/**
A block to provide a hook to provide a custom NSLayoutManager to the ASTextKitRenderer
*/
@property (nonatomic, copy) NSLayoutManager * (^layoutManagerCreationBlock)(void);
/**
A block to provide a hook to provide a NSTextStorage to the Text Kit's layout manager.
*/
@property (nonatomic, copy) NSTextStorage * (^textStorageCreationBlock)(NSAttributedString *attributedString);
@end
/**

View File

@@ -139,7 +139,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
{
[self truncater];
// if we have no scale factors or an unconstrained width, there is no reason to try to adjust the font size
if ([_attributes.pointSizeScaleFactors count] > 0 && isinf(_constrainedSize.width) == NO) {
if (isinf(_constrainedSize.width) == NO && [_attributes.pointSizeScaleFactors count] > 0) {
_currentScaleFactor = [[self fontSizeAdjuster] scaleFactor];
}
@@ -174,7 +174,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
ASDisplayNodeAssertNotNil(context, @"This is no good without a context.");
// This renderer may not be the one that did the sizing. If that is the case its _currentScaleFactor will not be set, so we should compute it now
if ([_attributes.pointSizeScaleFactors count] > 0 && isinf(_constrainedSize.width) == NO && _sizeIsCalculated == NO) {
if (_sizeIsCalculated == NO && isinf(_constrainedSize.width) == NO && [_attributes.pointSizeScaleFactors count] > 0) {
_currentScaleFactor = [[self fontSizeAdjuster] scaleFactor];
}