| OLD | NEW |
| 1 Polymer({ | 1 Polymer({ |
| 2 is: 'app-box', | 2 is: 'app-box', |
| 3 | 3 |
| 4 behaviors: [ | 4 behaviors: [ |
| 5 Polymer.AppScrollEffectsBehavior, | 5 Polymer.AppScrollEffectsBehavior, |
| 6 Polymer.IronResizableBehavior | 6 Polymer.IronResizableBehavior |
| 7 ], | 7 ], |
| 8 | 8 |
| 9 listeners: { | 9 listeners: { |
| 10 'iron-resize': '_resizeHandler' | 10 'iron-resize': '_resizeHandler' |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 */ | 74 */ |
| 75 isOnScreen: function() { | 75 isOnScreen: function() { |
| 76 return this._elementTop < this._scrollTop + this._cachedScrollTargetHeig
ht | 76 return this._elementTop < this._scrollTop + this._cachedScrollTargetHeig
ht |
| 77 && this._elementTop + this._elementHeight > this._scrollTop; | 77 && this._elementTop + this._elementHeight > this._scrollTop; |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 _resizeHandler: function() { | 80 _resizeHandler: function() { |
| 81 this.resetLayout(); | 81 this.resetLayout(); |
| 82 }, | 82 }, |
| 83 | 83 |
| 84 _getDOMRef: function(id) { |
| 85 if (id === 'background') { |
| 86 return this.$.background; |
| 87 } |
| 88 if (id === 'backgroundFrontLayer') { |
| 89 return this.$.backgroundFrontLayer; |
| 90 } |
| 91 }, |
| 92 |
| 84 /** | 93 /** |
| 85 * Returns an object containing the progress value of the scroll effects. | 94 * Returns an object containing the progress value of the scroll effects. |
| 86 * | 95 * |
| 87 * @method getScrollState | 96 * @method getScrollState |
| 88 * @return {Object} | 97 * @return {Object} |
| 89 */ | 98 */ |
| 90 getScrollState: function() { | 99 getScrollState: function() { |
| 91 return { progress: this._progress }; | 100 return { progress: this._progress }; |
| 92 } | 101 } |
| 93 }); | 102 }); |
| OLD | NEW |