Stopped trying to cache the currentScaleFactor

Was running into issues where the scale factor would get cleared when setting a new atributedString on a textNode.

I was clearing out the currentScaleFactor when setting an attributedString into a textNode. It appears that `_calculateSize` isn't always called when setting a new string into a ASTextNode. It can be the case that only `drawInContext:bounds:` is called. With _currentScaleFactor cleared out the renderer that calls`drawInContext...` was being called with a scaleFactor of 0.

It could be the case that the fix could be to remove the clearing of `currentScaleFactor` from `setAttributedString`, but this seems like a safer fix to me. It does, however, require an extra run through the font adjuster when enabled.
This commit is contained in:
rcancro
2016-02-23 16:51:10 -08:00
parent 92f87756b3
commit 878fedd8f3
4 changed files with 8 additions and 22 deletions

View File

@@ -15,9 +15,4 @@
*/
@property (nonatomic, copy) NSArray *pointSizeScaleFactors;
/**
@abstract The currently applied scale factor, or 0 if the text node is not being scaled.
*/
@property (nonatomic, assign, readonly) CGFloat currentScaleFactor;
@end