Fixed asciiArtString. (#2523)

This commit is contained in:
george-gw
2016-11-02 01:33:27 +01:00
committed by Adlai Holler
parent a6e2f8e5ab
commit ff9e493a59
4 changed files with 3 additions and 27 deletions

View File

@@ -100,19 +100,6 @@
@end @end
#pragma mark - Debugging
@implementation ASAbsoluteLayoutSpec (Debugging)
- (NSString *)debugBoxString
{
return [ASLayoutSpec asciiArtStringForChildren:self.children parentName:[self asciiArtName]];
}
@end
#pragma mark - ASStaticLayoutSpec #pragma mark - ASStaticLayoutSpec
@implementation ASStaticLayoutSpec : ASAbsoluteLayoutSpec @implementation ASStaticLayoutSpec : ASAbsoluteLayoutSpec

View File

@@ -345,7 +345,7 @@ ASEnvironmentLayoutExtensibilityForwarding
- (NSString *)asciiArtString - (NSString *)asciiArtString
{ {
NSArray *children = self.child ? @[self.child] : self.children; NSArray *children = self.children.count < 2 && self.child ? @[self.child] : self.children;
return [ASLayoutSpec asciiArtStringForChildren:children parentName:[self asciiArtName]]; return [ASLayoutSpec asciiArtStringForChildren:children parentName:[self asciiArtName]];
} }

View File

@@ -74,14 +74,3 @@ static NSUInteger const kOverlayChildIndex = 1;
} }
@end @end
@implementation ASOverlayLayoutSpec (Debugging)
#pragma mark - ASLayoutElementAsciiArtProtocol
- (NSString *)debugBoxString
{
return [ASLayoutSpec asciiArtStringForChildren:@[self.overlay, self.child] parentName:[self asciiArtName]];
}
@end

View File

@@ -50,12 +50,12 @@ NS_ASSUME_NONNULL_BEGIN
previousLayout:(std::shared_ptr<ASDisplayNodeLayout>)previousLayout NS_DESIGNATED_INITIALIZER; previousLayout:(std::shared_ptr<ASDisplayNodeLayout>)previousLayout NS_DESIGNATED_INITIALIZER;
/** /**
* Insert and remove subnodes that where added or removed between the previousLayout and the pendingLayout * Insert and remove subnodes that were added or removed between the previousLayout and the pendingLayout
*/ */
- (void)commitTransition; - (void)commitTransition;
/** /**
* Insert all new subnodes that where added between the previous layout and the pending layout * Insert all new subnodes that were added between the previous layout and the pending layout
*/ */
- (void)applySubnodeInsertions; - (void)applySubnodeInsertions;