Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust text attachment drawing to account for fractional textContainer width #1

Open
willbur1984 opened this issue Jun 7, 2017 · 0 comments

Comments

@willbur1984
Copy link
Member

willbur1984 commented Jun 7, 2017

Within KSOTokenDefaultTextAttachment, attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex: provides the maximum width for the text attachment on the current line given CGRectGetWidth(lineFrag) - glyphPosition.x. This should be taken into account when drawing the image, as a result the image should adjust its appearance to reveal more of the text it represents if more space becomes available on a given line.

The current implementation just assumes max width to be the width of the containing text view would put each large text attachment on its own line, which is not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant