| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <import src="../../framework/sky-element/sky-element.sky" as="SkyElement" /> | 6 <import src="../../framework/sky-element/sky-element.sky" as="SkyElement" /> |
| 7 <import src="city-data-service.sky" as="CityDataService" /> | 7 <import src="city-data-service.sky" as="CityDataService" /> |
| 8 <import src="city-sequence.sky" as="CitySequence" /> | 8 <import src="city-sequence.sky" as="CitySequence" /> |
| 9 | 9 |
| 10 <template> | 10 <template> |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 var scrollFrame = this.scroller.getCurrentFrame(); | 592 var scrollFrame = this.scroller.getCurrentFrame(); |
| 593 this.tiler.updateFirstItem(indexOffset); | 593 this.tiler.updateFirstItem(indexOffset); |
| 594 this.updateView(data.items, false); | 594 this.updateView(data.items, false); |
| 595 }, | 595 }, |
| 596 | 596 |
| 597 handleScroll: function(event) { | 597 handleScroll: function(event) { |
| 598 if (!this.scroller.captureNewFrame(event)) | 598 if (!this.scroller.captureNewFrame(event)) |
| 599 return; | 599 return; |
| 600 | 600 |
| 601 this.updateView(this.loader.getItems(), true); | 601 this.updateView(this.loader.getItems(), true); |
| 602 }, |
| 603 |
| 604 scrollBy: function(amount) { |
| 605 this.scrollerElement.scrollTop += amount; |
| 606 this.handleScroll({ target: this.scrollerElement }); |
| 602 } | 607 } |
| 603 }); | 608 }); |
| 604 | 609 |
| 605 })(this); | 610 })(this); |
| 606 | 611 |
| 607 </script> | 612 </script> |
| 608 | 613 |
| OLD | NEW |