RCTVirtualTextShadowView.m 626 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <React/RCTVirtualTextShadowView.h>
  8. #import <React/RCTShadowView+Layout.h>
  9. #import <yoga/Yoga.h>
  10. #import <React/RCTRawTextShadowView.h>
  11. @implementation RCTVirtualTextShadowView {
  12. BOOL _isLayoutDirty;
  13. }
  14. #pragma mark - Layout
  15. - (void)dirtyLayout
  16. {
  17. [super dirtyLayout];
  18. if (_isLayoutDirty) {
  19. return;
  20. }
  21. _isLayoutDirty = YES;
  22. [self.superview dirtyLayout];
  23. }
  24. - (void)clearLayout
  25. {
  26. _isLayoutDirty = NO;
  27. }
  28. @end