Bug 297780 - undetermined progress meter goes left to right in RTL interface
p=Ryan Jones <sciguyryan@gmail.com> r=mano git-svn-id: svn://10.0.0.236/trunk@220484 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
dd71e3d60e
commit
9677344720
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user