2018-01-23 23:17:57 -08:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-01-23 23:17:57 -08:00
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2018-01-23 23:17:57 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import "RCTVirtualTextShadowView.h"
|
|
|
|
|
|
|
|
#import <React/RCTShadowView+Layout.h>
|
|
|
|
#import <yoga/Yoga.h>
|
|
|
|
|
|
|
|
#import "RCTRawTextShadowView.h"
|
|
|
|
|
|
|
|
@implementation RCTVirtualTextShadowView {
|
|
|
|
BOOL _isLayoutDirty;
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma mark - Layout
|
|
|
|
|
|
|
|
- (void)dirtyLayout
|
|
|
|
{
|
|
|
|
[super dirtyLayout];
|
|
|
|
|
|
|
|
if (_isLayoutDirty) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
_isLayoutDirty = YES;
|
|
|
|
|
|
|
|
[self.superview dirtyLayout];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)clearLayout
|
|
|
|
{
|
|
|
|
_isLayoutDirty = NO;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|