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

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

Issue 2746363013: [MD Bookmarks] Add a drag and drop indicator to bookmarks. (Closed)
Patch Set: 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/folder_node.js
diff --git a/chrome/browser/resources/md_bookmarks/folder_node.js b/chrome/browser/resources/md_bookmarks/folder_node.js
index ff0f867a50c79ad0045c1366287a7531ca5d54c2..f059bdd9630e24e32de650a6166c74ded4f64d0f 100644
--- a/chrome/browser/resources/md_bookmarks/folder_node.js
+++ b/chrome/browser/resources/md_bookmarks/folder_node.js
@@ -38,6 +38,7 @@ Polymer({
},
},
+ /** @override */
attached: function() {
this.watch('item_', function(state) {
return state.nodes[this.itemId];
@@ -52,6 +53,11 @@ Polymer({
this.updateFromStore();
},
+ /** @return {HTMLElement} */
+ getDropTarget: function() {
+ return this.$.container;
+ },
+
/**
* @private
* @return {string}
@@ -118,5 +124,13 @@ Polymer({
*/
isFolder_: function(itemId) {
return !this.getState().nodes[itemId].url;
- }
+ },
+
+ /**
+ * @private
+ * @return {boolean}
+ */
+ isRootFolder_: function() {
+ return this.depth == 0;
+ },
});

Powered by Google App Engine
This is Rietveld 408576698