Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4305)

Unified Diff: chrome/browser/resources/md_bookmarks/item.js

Issue 2741393002: MD Bookmarks: Implement item selection in new data flow system (Closed)
Patch Set: Review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_bookmarks/actions.js ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/item.js
diff --git a/chrome/browser/resources/md_bookmarks/item.js b/chrome/browser/resources/md_bookmarks/item.js
index 16a525ba02031a9c608cbe9bcca92dab58bb40d0..4ff4515e9d9f9cd3898547b78a31b6a0467bc46a 100644
--- a/chrome/browser/resources/md_bookmarks/item.js
+++ b/chrome/browser/resources/md_bookmarks/item.js
@@ -44,6 +44,9 @@ Polymer({
this.watch('item_', function(store) {
return store.nodes[this.itemId];
}.bind(this));
+ this.watch('isSelectedItem_', function(store) {
+ return !!store.selection.items[this.itemId];
+ }.bind(this));
this.updateFromStore();
},
@@ -70,11 +73,8 @@ Polymer({
* @private
*/
onClick_: function(e) {
- this.fire('select-item', {
- item: this.item_,
- range: e.shiftKey,
- add: e.ctrlKey,
- });
+ this.dispatch(bookmarks.actions.selectItem(
+ this.itemId, e.ctrlKey, e.shiftKey, this.getState()));
},
/**
« no previous file with comments | « chrome/browser/resources/md_bookmarks/actions.js ('k') | chrome/browser/resources/md_bookmarks/reducers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698