diff options
author | fukino <fukino@chromium.org> | 2015-04-23 02:05:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 09:06:20 +0000 |
commit | 98c544c39d429fe7d27d86337790f26ce74e782f (patch) | |
tree | b64d75cfa950892942b622a73bb751ee67ac078a | |
parent | 07d3eb3871d5d7bb8948bc33ee47bd50a00f7eea (diff) | |
download | chromium_src-98c544c39d429fe7d27d86337790f26ce74e782f.zip chromium_src-98c544c39d429fe7d27d86337790f26ce74e782f.tar.gz chromium_src-98c544c39d429fe7d27d86337790f26ce74e782f.tar.bz2 |
Files.app: Update image-dominant state of the grid when data model is changed.
BUG=479379
TEST=manual test
Review URL: https://codereview.chromium.org/1088003003
Cr-Commit-Position: refs/heads/master@{#326481}
-rw-r--r-- | ui/file_manager/file_manager/foreground/js/ui/file_grid.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js index 20982b3..bf208d0 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/file_grid.js +++ b/ui/file_manager/file_manager/foreground/js/ui/file_grid.js @@ -36,8 +36,10 @@ FileGrid.prototype = { if (this.dataModel) this.dataModel.removeEventListener('splice', this.onSplice_.bind(this)); this.dataModelDescriptor_.set.call(this, model); - if (this.dataModel) + if (this.dataModel) { this.dataModel.addEventListener('splice', this.onSplice_.bind(this)); + this.classList.toggle('image-dominant', this.dataModel.isImageDominant()); + } } }; |