Cleaned up element dir detection funciton
This commit is contained in:
parent
d719ee6a07
commit
76b0e8c01c
1 changed files with 2 additions and 5 deletions
|
@ -68,13 +68,10 @@ import { currentSettings as userSettings } from './settings/userSettings';
|
|||
}
|
||||
|
||||
export function getElementIsRTL(element) {
|
||||
let elementIsRTL = false;
|
||||
if (window.getComputedStyle) { // all browsers
|
||||
elementIsRTL = window.getComputedStyle(element, null).getPropertyValue('direction') == 'rtl';
|
||||
} else {
|
||||
elementIsRTL = element.currentStyle.direction == 'rtl'; // IE5-8
|
||||
return window.getComputedStyle(element, null).getPropertyValue('direction') == 'rtl';
|
||||
}
|
||||
return elementIsRTL;
|
||||
return element.currentStyle.direction == 'rtl';
|
||||
}
|
||||
|
||||
export function updateCurrentCulture() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue