You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please try above. If display once, the player will play and the slider value keeps changing. If displaying twice and clicking the play button, the slider value only changes once.
The text was updated successfully, but these errors were encountered:
hai-schrodinger
changed the title
Player doesn't play if displaying twice
BUG(?): Player doesn't play if displaying twice
Nov 25, 2024
the behavior also occurs when using observe (not sure if that does the exact same thing as the link you used)
fromipywidgetsimportIntSlider, Play, HBoxfromtraitletsimportlinkplayer=Play(interval=500)
slider=IntSlider(max=100, min=0, step=1)
# link((player, 'value'), (slider, 'value'))defon_value_change(change):
slider.value=change['new']
# print(change['new'])player.observe(on_value_change, names='value')
# uncomment the below line to see the working model# HBox([slider, player])# uncomment the below line to see that when you hit play it only increments once for each time play is clicked# HBox([slider, player, player])
Hi there,
Please try above. If display once, the player will play and the slider value keeps changing. If displaying twice and clicking the play button, the slider value only changes once.
The text was updated successfully, but these errors were encountered: