Anvil Extras Transition.height_in

What I’m trying to do:
is there a way that the panel don’t jump a little when expanding?
It’s moves a little to the top when the height increases.

Code Sample:

from anvil_extras.animation import (animate, Transition, slide_in_down, slide_out_up, wait_for)

  def link_samples_click(self, **event_args):

    if self.card_samples.visible != True:
      # set this now because we need it on the screen to measure its height
      self.card_samples.visible = True
      t = slide_in_down | Transition.height_in(self.card_samples)
      animate(self.card_samples, t, duration=900).wait()
    else:
      t = slide_out_up | Transition.height_out(self.card_samples)
      animate(self.card_samples, t, duration=900).wait()
      self.card_samples.visible = False 

Ok, found it… Combination of t = slide_in_down | Transition.height_in(self.card_samples) cause it. Removing slide fixes it.

1 Like