Skip to content

Does animation target the wrong element? #450

Answered by s-cork
stenci asked this question in Q&A
Discussion options

You must be logged in to vote

Buttons are annoying in anvil. They have a container element around the main button element. We might want to make this the default (it's the default for the augment library) ie special case an anvil button.

The current approach would be to pass the button dom node to the animate method.

Something like.

from anvil.js import get_dom_node

# target the button dom node
button_el = get_dom_node(self.button).firstElementChild
animate(button_el)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stenci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants