-
Notifications
You must be signed in to change notification settings - Fork 194
Adding RTL support #169
base: master
Are you sure you want to change the base?
Adding RTL support #169
Conversation
Tests are still missing. Every test should be also replicated in RTL mode. |
Initial scan looks alright. Will give a full review when tests are added. |
@@ -67,7 +75,6 @@ angular.module('ui.layout', []) | |||
|
|||
var debounceEvent; | |||
function draw() { | |||
var position = ctrl.sizeProperties.flowProperty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this change made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the dependency of the code on the flow property variable. It only remains when setting the css. For one, this is a refactoring step that makes the code more readable in my opinion. But more importantly it is also more robust, because the position keeps being valid even if the flow property changes (in case the layout is switched to RTL for example). Without this change the position is stored in container.left
(for example), which turns into container.right
when switching to RTL, a problem that I wanted to avoid.
@SomeKittens: I've added tests for RTL layout. From my side the PR is ready. |
Hey, Thanks |
Adds right-to-left support for ui layout containers. This will automatically work as long as the
ui-layout
element is a child of an element with a direction set tortl
.Fixes issue #168.