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

feat: RTL support #58

Merged
merged 6 commits into from
Oct 25, 2017
Merged

feat: RTL support #58

merged 6 commits into from
Oct 25, 2017

Conversation

willshowell
Copy link
Contributor

@willshowell willshowell commented Oct 25, 2017

This allows the positioning service to properly interpret xPosition in rtl mode. Previously, a value of after with dir="rtl" would result in the popover opening to the right. It also updates the transform origin.

Caveat: I've been struggling to troubleshoot an issue where SatPopoverAnchor does not inject the correct Dir instance when using the [dir] directive from BidiModule. It currently only works when dir is statically set on the body. Tracking #59.

- For whatever reason, I'm unable to get the popover anchor to inject the correct Dir instance. It always seems to inject the root Directionality instance, which doesn't support dynamic toggling. For a future PR
- Testing can still be done by statically adding `dir="rtl"` to the body.
/** The text direction of the containing app. */
private get _direction(): Direction {
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make private _getDirection()

@willshowell willshowell merged commit d78207e into master Oct 25, 2017
@willshowell willshowell deleted the feat/rtl-support branch October 25, 2017 17:02
@willshowell willshowell mentioned this pull request Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant