| Index: chrome/browser/resources/md_bookmarks/dnd_chip.js
|
| diff --git a/chrome/browser/resources/md_bookmarks/dnd_chip.js b/chrome/browser/resources/md_bookmarks/dnd_chip.js
|
| index 41bd9426dba3e8f562413820a23bddf2b676b6b8..238aa35ba949ee139dbe6b0de94d31b82d0f0ecf 100644
|
| --- a/chrome/browser/resources/md_bookmarks/dnd_chip.js
|
| +++ b/chrome/browser/resources/md_bookmarks/dnd_chip.js
|
| @@ -14,27 +14,31 @@ Polymer({
|
|
|
| /** @private */
|
| isFolder_: Boolean,
|
| +
|
| + /** @private */
|
| + isMultiItem_: Boolean,
|
| },
|
|
|
| /**
|
| * @param {number} x
|
| * @param {number} y
|
| * @param {!Array<BookmarkNode>} items
|
| + * @param {!BookmarkNode} dragItem
|
| */
|
| - showForItems: function(x, y, items) {
|
| + showForItems: function(x, y, items, dragItem) {
|
| this.style.setProperty('--mouse-x', x + 'px');
|
| this.style.setProperty('--mouse-y', y + 'px');
|
|
|
| if (this.showing_)
|
| return;
|
|
|
| - var firstItem = items[0];
|
| - this.isFolder_ = !firstItem.url;
|
| - // TODO(calamity): handle multi-item UI.
|
| - if (firstItem.url)
|
| - this.$.icon.style.backgroundImage = cr.icon.getFavicon(firstItem.url);
|
| + this.isFolder_ = !dragItem.url;
|
| + this.isMultiItem_ = items.length > 1;
|
| + if (dragItem.url)
|
| + this.$.icon.style.backgroundImage = cr.icon.getFavicon(dragItem.url);
|
|
|
| - this.$.title.textContent = firstItem.title;
|
| + this.$.title.textContent = dragItem.title;
|
| + this.$.count.textContent = items.length;
|
| this.showing_ = true;
|
| },
|
|
|
|
|