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

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

Issue 2746363013: [MD Bookmarks] Add a drag and drop indicator to bookmarks. (Closed)
Patch Set: fix nit 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
Index: chrome/browser/resources/md_bookmarks/app.js
diff --git a/chrome/browser/resources/md_bookmarks/app.js b/chrome/browser/resources/md_bookmarks/app.js
index 6e4ccd6dfdb04ae4c1e168c7595cf8f15497a825..1c0983e0992604ffedfad62ad5fbc3fbd725b948 100644
--- a/chrome/browser/resources/md_bookmarks/app.js
+++ b/chrome/browser/resources/md_bookmarks/app.js
@@ -23,6 +23,9 @@ Polymer({
/** @private{?function(!Event)} */
boundUpdateSidebarWidth_: null,
+ /** @private {bookmarks.DNDManager} */
+ dndManager_: null,
+
/** @override */
attached: function() {
this.watch('searchTerm_', function(store) {
@@ -33,7 +36,8 @@ Polymer({
var nodeList = bookmarks.util.normalizeNodes(results[0]);
var initialState = bookmarks.util.createEmptyState();
initialState.nodes = nodeList;
- initialState.selectedFolder = nodeList['0'].children[0];
+ initialState.selectedFolder =
+ nodeList[bookmarks.util.ROOT_NODE_ID].children[0];
bookmarks.Store.getInstance().init(initialState);
bookmarks.ApiListener.init();
@@ -43,10 +47,14 @@ Polymer({
this.boundUpdateSidebarWidth_ = this.updateSidebarWidth_.bind(this);
this.initializeSplitter_();
+
+ this.dndManager_ = new bookmarks.DNDManager();
+ this.dndManager_.init();
},
detached: function() {
window.removeEventListener('resize', this.boundUpdateSidebarWidth_);
+ this.dndManager_.destroy();
},
/**
« no previous file with comments | « chrome/browser/resources/md_bookmarks/app.html ('k') | chrome/browser/resources/md_bookmarks/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698