OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 util.addPageLoadHandler(function() { | 5 util.addPageLoadHandler(function() { |
6 if (!location.hash) | 6 if (!location.hash) |
7 return; | 7 return; |
8 | 8 |
9 var pageState; | 9 var pageState; |
10 if (location.search) { | 10 if (location.search) { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 this.onFilenameEditKeydown_.bind(this)); | 237 this.onFilenameEditKeydown_.bind(this)); |
238 | 238 |
239 util.createChild(this.toolbar_, 'button-spacer'); | 239 util.createChild(this.toolbar_, 'button-spacer'); |
240 | 240 |
241 this.prompt_ = new ImageEditor.Prompt( | 241 this.prompt_ = new ImageEditor.Prompt( |
242 this.container_, this.displayStringFunction_); | 242 this.container_, this.displayStringFunction_); |
243 | 243 |
244 var onThumbnailError = this.context_.onThumbnailError || function() {}; | 244 var onThumbnailError = this.context_.onThumbnailError || function() {}; |
245 | 245 |
246 if (this.context_.allowMosaic) { | 246 if (this.context_.allowMosaic) { |
247 this.modeButton_ = util.createChild(this.toolbar_, 'button mode'); | 247 this.modeButton_ = util.createChild(this.toolbar_, 'button mode', 'button'); |
248 this.modeButton_.addEventListener('click', | 248 this.modeButton_.addEventListener('click', |
249 this.toggleMode_.bind(this, null)); | 249 this.toggleMode_.bind(this, null)); |
250 | 250 |
251 this.mosaicMode_ = new MosaicMode(content, | 251 this.mosaicMode_ = new MosaicMode(content, |
252 this.dataModel_, this.selectionModel_, this.metadataCache_, | 252 this.dataModel_, this.selectionModel_, this.metadataCache_, |
253 this.toggleMode_.bind(this, null), onThumbnailError); | 253 this.toggleMode_.bind(this, null), onThumbnailError); |
254 } | 254 } |
255 | 255 |
256 this.slideMode_ = new SlideMode(this.container_, content, | 256 this.slideMode_ = new SlideMode(this.container_, content, |
257 this.toolbar_, this.prompt_, | 257 this.toolbar_, this.prompt_, |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 Gallery.prototype.updateThumbnails_ = function() { | 853 Gallery.prototype.updateThumbnails_ = function() { |
854 if (this.currentMode_ == this.slideMode_) | 854 if (this.currentMode_ == this.slideMode_) |
855 this.slideMode_.updateThumbnails(); | 855 this.slideMode_.updateThumbnails(); |
856 | 856 |
857 if (this.mosaicMode_) { | 857 if (this.mosaicMode_) { |
858 var mosaic = this.mosaicMode_.getMosaic(); | 858 var mosaic = this.mosaicMode_.getMosaic(); |
859 if (mosaic.isInitialized()) | 859 if (mosaic.isInitialized()) |
860 mosaic.reload(); | 860 mosaic.reload(); |
861 } | 861 } |
862 }; | 862 }; |
OLD | NEW |