Chromium Code Reviews| Index: ui/file_manager/gallery/js/gallery.js |
| diff --git a/ui/file_manager/gallery/js/gallery.js b/ui/file_manager/gallery/js/gallery.js |
| index 1bbde3214667fb4923938b0c8da90762a0dce4e4..b866cbab962a8b3ce527d56f5e4d45ea9a8b729f 100644 |
| --- a/ui/file_manager/gallery/js/gallery.js |
| +++ b/ui/file_manager/gallery/js/gallery.js |
| @@ -537,6 +537,21 @@ Gallery.prototype.onChangeToSlideMode_ = function() { |
| this.changeCurrentMode_(this.slideMode_); |
| }; |
| + |
| +/** |
| + * Update attributes of slide/thumbnail toggle button |
| + * @param {Event=} event Event that caused this call |
| + * @private |
| +*/ |
|
oka
2017/01/12 01:59:24
Add a space before *.
takise
2017/01/12 04:08:05
Done.
|
| + |
|
oka
2017/01/12 01:59:24
Remove this empty line.
takise
2017/01/12 04:08:05
Done.
|
| +Gallery.prototype.updateModeButtonAttribute_ = function(event) { |
| + var button = event.currentTarget; |
|
oka
2017/01/12 01:59:24
Are you sure that event is not undefined? If event
takise
2017/01/12 04:08:05
Done.
|
| + if (this.currentMode_ === this.slideMode_) |
| + button.setAttribute("aria-label", str("GALLERY_SLIDE")); |
| + else |
| + button.setAttribute("aria-label", str("GALLERY_THUMBNAIL")); |
| +} |
| + |
| /** |
| * Change current mode. |
| * @param {!(SlideMode|ThumbnailMode)} mode Target mode. |
| @@ -566,6 +581,8 @@ Gallery.prototype.changeCurrentMode_ = function(mode, opt_event) { |
| var thumbnailRect = ImageRect.createFromBounds( |
| this.thumbnailMode_.getThumbnailRect(thumbnailIndex)); |
| + this.updateModeButtonAttribute_(opt_event); |
|
oka
2017/01/12 01:59:24
I think this line should be moved to setCurrentMod
takise
2017/01/12 04:08:05
Done.
|
| + |
| if (mode === this.thumbnailMode_) { |
| this.setCurrentMode_(this.thumbnailMode_); |
| this.slideMode_.leave( |