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

Unified Diff: third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/parallax-background-extracted.js

Issue 2633633002: Polymer: Remove unused app-layout element (Closed)
Patch Set: Fix closure Created 3 years, 11 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/v1_0/components-chromium/app-layout/app-scroll-effects/effects/parallax-background-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/parallax-background-extracted.js b/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/parallax-background-extracted.js
deleted file mode 100644
index 72bc02b8c39524707e48c03337a1da2187ab4364..0000000000000000000000000000000000000000
--- a/third_party/polymer/v1_0/components-chromium/app-layout/app-scroll-effects/effects/parallax-background-extracted.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Vertically translate the background based on a factor of the scroll position.
- */
- Polymer.AppLayout.registerEffect('parallax-background', {
- /**
- * @param {{scalar: string}} config
- * @this Polymer.AppLayout.ElementWithBackground
- */
- setUp: function setUp(config) {
- var fx = {};
- var scalar = parseFloat(config.scalar);
- fx.background = this._getDOMRef('background');
- fx.backgroundFrontLayer = this._getDOMRef('backgroundFrontLayer');
- fx.backgroundRearLayer = this._getDOMRef('backgroundRearLayer');
- fx.deltaBg = fx.backgroundFrontLayer.offsetHeight - fx.background.offsetHeight;
- if (fx.deltaBg === 0) {
- if (isNaN(scalar)) {
- scalar = 0.8;
- }
- fx.deltaBg = this._dHeight * scalar;
- } else {
- if (isNaN(scalar)) {
- scalar = 1;
- }
- fx.deltaBg = fx.deltaBg * scalar;
- }
- this._fxParallaxBackground = fx;
- },
- /** @this Polymer.AppLayout.ElementWithBackground */
- run: function run(p, y) {
- var fx = this._fxParallaxBackground;
- this.transform('translate3d(0px, ' + (fx.deltaBg * Math.min(1, p)) + 'px, 0px)', fx.backgroundFrontLayer);
- if (fx.backgroundRearLayer) {
- this.transform('translate3d(0px, ' + (fx.deltaBg * Math.min(1, p)) + 'px, 0px)', fx.backgroundRearLayer);
- }
- },
- /** @this Polymer.AppLayout.ElementWithBackground */
- tearDown: function tearDown() {
- delete this._fxParallaxBackground;
- }
- });

Powered by Google App Engine
This is Rietveld 408576698