-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0 preview - sample usage #226
Comments
The neon-animations behaviors are available as hybrid behaviors, but not as class mixins. So you have to add them to your class-style element using the
instead of
Also, you have to |
Thank you so much for the insights...are we going to get all these kind of changes documented ? |
@samuelcardillo Thanks for the solution, also had a similar challenge, but I don't know how I can reference a child node as a |
Hey @stackt52 , its because you need to give a In your case, you could do something like : PS: The "Polymer.dom(this.root)" is to access the DOM of your element. If you do |
Try this! |
When I try @samuelcardillo solution I'm getting My assumption is that maybe it's because the |
Turns out that feature has been deprecated: Polymer/polymer#4160 |
@stackt52 Huh, that's odd. It's working fine for me in Firefox & Chromium. Here's the neon-animation relevant parts of my element definition. class LoginButtonElement extends Polymer.mixinBehaviors([
Polymer.NeonAnimationRunnerBehavior,
Polymer.NeonSharedElementAnimatableBehavior
], Polymer.Element) { Setting properties in the ready() {
super.ready();
this.animationConfig = {
"authStart": [{
name: "ripple-animation",
id: "ripple",
fromPage: this
}, {
animatable: this.$.authScreen,
type: "authStart"
}]
};
this.sharedElements = {
ripple: this.$.button
};
} |
@wincinderith thank you very much for the clarification, you've saved me from the process of reinventing the wheel (actually I even started rewriting my own animation package). Before I was initialising the ... and after some changes according to your code: and it now works!! |
I'm trying the way @wincinderith suggests and get the following warning message: UPDATE |
@samuelcardillo I'm still confused as f. Should your import be |
Heya @ShaggyDude , the Also @diegolz the KeyFrameEffect error is an odd quirk as it seems to have been dropped by chrome which is why the polyfill is necessary |
I'm trying to use the neon animations in 2.0 Polymer element, looking at the 2.0 preview branch it still look like the early version of Polymer. Came to know that the behaviors are not avaiable in 2.0, any sample / demo on how can I integrate neon-animation withe Polymer 2.0 custom elements?
Thanks,
Sowmyan
The text was updated successfully, but these errors were encountered: