Replies: 1 comment
-
It's a little tricky because the directive uses the FLIP technique and therefore must measure element state before and after rendering. It relies on the reactive update lifecycle in Here's an example. This partially implements the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to use the animate directive for a standalone lit-html template, i.e., not rendered by a custom (Lit) element. Is this possible? I can't get it to work. Here is a minimal example:
The call to animate throws an error:
Uncaught TypeError: Cannot read properties of undefined (reading 'addController') at Animate.update (animate.ts:232:18)
. It's trying to readaddController
fromthis._host
and fails, because there is no host, because I'm not within a custom element.Is there a workaround here? I understand that there needs to be a host of some kind so that the animation can maintain state (?), but you need to bring in custom elements? Or could the whole process be controlled just by a
ReactiveController
that's just a javascript object?I'm quite keen on using the animate directive in a minimalistic context, without custom elements.
Beta Was this translation helpful? Give feedback.
All reactions