diff options
author | François Frisch | 2012-03-21 11:48:30 -0700 |
---|---|---|
committer | François Frisch | 2012-03-21 11:48:30 -0700 |
commit | 6f995a7ea1f35632fa54ad007953377bdf119c3a (patch) | |
tree | e4b3ffdfad35aed63a5bffee2b7995194edd087a /node_modules/montage | |
parent | 13dc16678356926e4782cb73eb7c58092eecbfc8 (diff) | |
download | ninja-6f995a7ea1f35632fa54ad007953377bdf119c3a.tar.gz |
Flow doesn't reset to origin 0 when changing the feed
Diffstat (limited to 'node_modules/montage')
-rw-r--r-- | node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js b/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js index b41df9a6..bdc74c83 100644 --- a/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js +++ b/node_modules/montage/ui/picasa-carousel.reel/picasa-carousel.js | |||
@@ -111,10 +111,17 @@ var PicasaCarousel = exports.PicasaCarousel = Montage.create(Component, /** @len | |||
111 | 111 | ||
112 | handleSearchRequestLoad: { | 112 | handleSearchRequestLoad: { |
113 | value: function(evt) { | 113 | value: function(evt) { |
114 | var response = JSON.parse(evt.target.responseText); | 114 | var response = JSON.parse(evt.target.responseText), |
115 | previousOrigin = this.flow.origin; | ||
115 | this.searchResults = response.feed.entry; | 116 | this.searchResults = response.feed.entry; |
116 | this.flow.length = this.initialPosition; | 117 | if (this.flow.length === 0) { |
117 | this.flow.origin = this.initialPosition; | 118 | this.flow.length = this.initialPosition; |
119 | } | ||
120 | if (previousOrigin === 0) { | ||
121 | this.flow.origin = this.initialPosition; | ||
122 | } else { | ||
123 | this.flow.origin = previousOrigin; | ||
124 | } | ||
118 | this.isSearching = false; | 125 | this.isSearching = false; |
119 | } | 126 | } |
120 | }, | 127 | }, |