Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/polymer/v0_8/components-chromium/neon-animation/animations/ripple-animation-extracted.js

Issue 1155683008: Rename polymer and cr_elements v0_8 to v1_0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v1
Patch Set: fix a merge mistake Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v0_8/components-chromium/neon-animation/animations/ripple-animation-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/neon-animation/animations/ripple-animation-extracted.js b/third_party/polymer/v0_8/components-chromium/neon-animation/animations/ripple-animation-extracted.js
deleted file mode 100644
index c7e8c715e4d8050bbc8dadf897c67c5b5f58cde3..0000000000000000000000000000000000000000
--- a/third_party/polymer/v0_8/components-chromium/neon-animation/animations/ripple-animation-extracted.js
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
- Polymer({
-
- is: 'ripple-animation',
-
- behaviors: [
- Polymer.NeonSharedElementAnimationBehavior
- ],
-
- configure: function(config, fromPage, toPage) {
- var shared = this.findSharedElements(config, fromPage, toPage);
- if (!shared) {
- return null;
- }
-
- var translateX, translateY;
- var toRect = shared.to.getBoundingClientRect();
- if (config.gesture) {
- translateX = config.gesture.x - (toRect.left + (toRect.width / 2));
- translateY = config.gesture.y - (toRect.left + (toRect.height / 2));
- } else {
- var fromRect = shared.from.getBoundingClientRect();
- translateX = (fromRect.left + (fromRect.width / 2)) - (toRect.left + (toRect.width / 2));
- translateY = (fromRect.top + (fromRect.height / 2)) - (toRect.left + (toRect.height / 2));
- }
- var translate = 'translate(' + translateX + 'px,' + translateY + 'px)';
-
- var size = Math.max(toRect.width + Math.abs(translateX) * 2, toRect.height + Math.abs(translateY) * 2);
- var diameter = Math.sqrt(2 * size * size);
- var scaleX = diameter / toRect.width;
- var scaleY = diameter / toRect.height;
- var scale = 'scale(' + scaleX + ',' + scaleY + ')';
-
- this.setPrefixedProperty(shared.to, 'transformOrigin', '50% 50%');
- shared.to.style.borderRadius = '50%';
-
- this._effect = new KeyframeEffect(shared.to, [
- {'transform': translate + ' scale(0)'},
- {'transform': translate + ' ' + scale}
- ], this.timingFromConfig(config));
- return this._effect;
- },
-
- complete: function() {
- if (this.sharedElements) {
- this.setPrefixedProperty(this.sharedElements.to, 'transformOrigin', '');
- this.sharedElements.to.style.borderRadius = '';
- }
- }
-
- });
-

Powered by Google App Engine
This is Rietveld 408576698