Exemplo n.º 1
0
def change(event):
    if event.keyCode == 39:
        global run
        if run is None:
            # start animation
            animloop(1)
        else:
            # stop animation
            window.cancelAnimationFrame(run)
            run = None
Exemplo n.º 2
0
def cancel_anim():
    global run

    window.cancelAnimationFrame(run)
    run = None
    for e in document.select('div.anim_letter'):
        e.style.transition = 'none'
        e.style.transform = 'translateY(0px)'
        if 'odd_letter' in e.attrs['class']:
            e.text = '2'
        if 'even_letter' in e.attrs['class']:
            e.text = '0'
    timer.set_timeout(show_banner, 300)
Exemplo n.º 3
0
def cancel_animation_frame(int_id):
    window.cancelAnimationFrame(int_id)
Exemplo n.º 4
0
def cancel_anim():
    global run
    window.cancelAnimationFrame(run)
    run = None
    print('anim is stopped!')