Bug 297780 - undetermined progress meter goes left to right in RTL interface

p=Ryan Jones <sciguyryan@gmail.com>
r=mano
This commit is contained in:
asqueella%gmail.com 2007-02-17 18:36:21 +00:00
Родитель 6d09ad2c4a
Коммит 11a186189e
1 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -66,16 +66,27 @@
<body><![CDATA[
var stack = document.getAnonymousElementByAttribute(this, "anonid", "stack");
var spacer = document.getAnonymousElementByAttribute(this, "anonid", "spacer");
var position = -1;
var isLTR =
document.defaultView.getComputedStyle(this, null).direction == "ltr";
var position = isLTR ? 4 : -1;
var interval = setInterval(function nextStep() {
try {
var width = stack.boxObject.width >> 2;
spacer.height = stack.boxObject.height;
spacer.width = width;
spacer.left = width * position;
position += 15 / (width + 150);
if (position >= 4)
position = -1;
if (isLTR) {
position += 15 / (width + 150);
if (position >= 4)
position = -1;
}
else {
position -= 15 / (width + 150);
if (position < 0)
position = 4;
}
} catch (e) {
clearInterval(interval);
}