Reduce the amount of CPU an undetermined progressmeter consumes b=279465 r=mconnor sr=jag

git-svn-id: svn://10.0.0.236/trunk@209704 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk 2006-09-11 13:55:19 +00:00
parent 05dbfc6a18
commit e6fe7e322e
2 changed files with 10 additions and 8 deletions

View File

@ -69,16 +69,17 @@
var position = -1;
var interval = setInterval(function nextStep() {
try {
var width = stack.boxObject.width >> 2;
spacer.height = stack.boxObject.height;
spacer.width = stack.boxObject.width >> 2;
spacer.left = spacer.width * position;
position += 30 / (stack.boxObject.width + 600);
spacer.width = width;
spacer.left = width * position;
position += 15 / (width + 150);
if (position >= 4)
position = -1;
} catch (e) {
clearInterval(interval);
}
}, 10);
}, 20);
]]></body>
</method>

View File

@ -69,16 +69,17 @@
var position = -1;
var interval = setInterval(function nextStep() {
try {
var width = stack.boxObject.width >> 2;
spacer.height = stack.boxObject.height;
spacer.width = stack.boxObject.width >> 2;
spacer.left = spacer.width * position;
position += 30 / (stack.boxObject.width + 600);
spacer.width = width;
spacer.left = width * position;
position += 15 / (width + 150);
if (position >= 4)
position = -1;
} catch (e) {
clearInterval(interval);
}
}, 10);
}, 20);
]]></body>
</method>