From c23aafe22f25063d366d490bf73eafa15a2ad805 Mon Sep 17 00:00:00 2001 From: homerjonathan Date: Sat, 17 Feb 2018 20:43:29 +0000 Subject: [PATCH 1/3] Removed Deprecated Neon-Animation --- README.md | 41 ++++++-- bower.json | 1 - demo/index.html | 2 - paper-dialog.html | 244 +++++++++++++++++++++++++++++++++++++--------- 4 files changed, 232 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index d1e6b2b..a266153 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,41 @@ this element. ### Animations -Set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog -is opened or closed. See the documentation in -[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation) for more info. +Animations used to use the neon-animation, however the library has since been @deprecated. -For example: +You can still use the set the `entry-animation` and/or `exit-animation` attributes to add an animation when the dialog is opened or closed. You can also create your own animation class. +For example the below the CSS is first declared (this one slides from off screen). You then point to the animation by selecting the class updating the `entry-animation`. Note that the +`exit-animation` is fade-out-animation which fades when the dialog is closed. ```html - - - - - + @keyframes keyFrameSlideDownIn { + 0% { + transform: translateY(-2000px); + opacity: 0; + } + 10% { + opacity: 0.2; + } + 100% { + transform: translateY(0); + opacity: 1; + } + } + + .my-animation { + transform: translateY(-2000px); + opacity: 0; + animation-delay: 0; + animation-name: keyFrameSlideDownIn; + animation-iteration-count: 1; + animation-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1); + animation-duration: 500ms; + animation-fill-mode: forwards; + } + + +

Header

Dialog body
diff --git a/bower.json b/bower.json index 3f8c02f..94cec10 100644 --- a/bower.json +++ b/bower.json @@ -19,7 +19,6 @@ "homepage": "https://github.com/PolymerElements/paper-dialog", "ignore": [], "dependencies": { - "neon-animation": "PolymerElements/neon-animation#1 - 2", "paper-dialog-behavior": "PolymerElements/paper-dialog-behavior#1 - 2", "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#1 - 2", "polymer": "Polymer/polymer#1.9 - 2" diff --git a/demo/index.html b/demo/index.html index d332d91..5abe4f1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -23,8 +23,6 @@ - - diff --git a/paper-dialog.html b/paper-dialog.html index 8287467..9c9986f 100644 --- a/paper-dialog.html +++ b/paper-dialog.html @@ -9,7 +9,6 @@ --> -