Closed GoogleCodeExporter closed 8 years ago
Yea I have no idea what's going on here. Maybe an issue entirely provoked by
Firebug
but here's a different test case:
var gex = new GEarthExtensions(ge);
var lookAt = gex.util.getLookAt();
var startLon = lookAt.getLongitude();
var callback = function() { console.log('complete'); }
for(i=0; i<100; i++) {
console.log(i);
}
var animation = new gex.fx.TimedAnimation(1000,
function(t) {
console.log(t);
if(t == 1000) {
console.log('render time = duration');
}
lookAt.setLongitude(startLon + t / 100);
ge.getView().setAbstractView(lookAt);
},
function() {
console.log('complete func');
callback();
}
);
animation.start();
Firebug output:
989
1000
render time = duration
1000
render time = duration
complete func
complete
complete func
complete
I can only get "complete func" to output twice if and only if I have
console.log(t);
or I have I have the for-loop. I can get "render time = duration" twice but
only one
"complete func" without both of those. Maybe Firebug is provoking a necessary
delay
for the error to show or it might be some weird execution within Firebug. At one
point I got it to show three "complete func" calls.
Regardless, I would like for it not to call "complete func" twice while still
having
all the debugging log calls throughout my code.
Thanks
Rob O.
Ender Tech Corp.
www.endertech.com
Original comment by ndrtek...@gmail.com
on 4 Apr 2010 at 3:31
Thanks for pointing out this issue with the duplicate complete under certain
conditions. I've confirmed the issue, but as it has a straightforward
workaround (you can just catch the first complete, and then ignore the next
one) I'm not planning to attempt a fix unless it seems to be causing some
issues in production code that are not easily worked around. If this is a
showbreaker for your code, provide additional details.
Original comment by jli...@google.com
on 4 Jan 2011 at 9:00
Original issue reported on code.google.com by
ndrtek...@gmail.com
on 4 Apr 2010 at 3:05