animation safeguards

28 views
Skip to first unread message

rio

unread,
Jun 26, 2012, 10:22:36 PM6/26/12
to google-visua...@googlegroups.com
Hi currently i am adding safeguards to stop people mucking around with charts while the animation is taking place such as generating images of charts part way through the animation process, click the next button too quickly, etc. So far i managed to get buttons to be disabled by using an additional div to check when a chart is freshly created apparently there is no animation-finish trigger when you enter the dynamic mode from a fixed chart.

What i need now is to be to display those error message along the lines of "Loading Data" similar to the error messages with the red square when you put in bad data.. and remove it once the animation has finished. Or perhaps i could do something more drastic?

    
     function drawChart() {
     
     if(document.getElementById('patient0').innerHTML == 'First'){
     document.getElementById('patient0').innerHTML = 'NA'
     }
     else{
     document.getElementById('creator').disabled = true;
     document.getElementById('saver').disabled = true;
     button.disabled = true;}


     google.visualization.events.addListener(chart, 'animationfinish', function() {
        
        document.getElementById('creator').disabled = false;
        document.getElementById('saver').disabled = false;
        button.disabled = false;
           });
Reply all
Reply to author
Forward
0 new messages