Chromium Code Reviews| Index: chrome/browser/resources/ntp4/tile_page.js |
| diff --git a/chrome/browser/resources/ntp4/tile_page.js b/chrome/browser/resources/ntp4/tile_page.js |
| index b5ed39d6c18e17969c7e5bb833022ddcd671d2c8..8d8fbb6028666a2daef9cebeb94b816bb705a5da 100644 |
| --- a/chrome/browser/resources/ntp4/tile_page.js |
| +++ b/chrome/browser/resources/ntp4/tile_page.js |
| @@ -18,6 +18,11 @@ cr.define('ntp4', function() { |
| else |
| ntp4.leaveRearrangeMode(); |
| } |
|
csilv
2011/09/20 19:05:34
Add a linefeed here.
Dan Beam
2011/09/20 23:00:21
Done.
|
| + function setCurrentDropEffect(dataTransfer, effect) { |
| + dataTransfer.dropEffect = effect; |
| + if (currentlyDraggingTile) |
| + currentlyDraggingTile.lastDropEffect = dataTransfer.dropEffect; |
|
Evan Stade
2011/09/21 21:58:29
= effect
Dan Beam
2011/09/21 23:28:38
I did this to filter out bad values. Do you not w
Evan Stade
2011/09/21 23:56:27
oh right, you said that before. I never deleted my
|
| + } |
| /** |
| * Creates a new Tile object. Tiles wrap content on a TilePage, providing |
| @@ -161,8 +166,8 @@ cr.define('ntp4', function() { |
| } else if (tilePage) { |
| // TODO(dbeam): Until we fix dropEffect to the correct behavior it will |
| // differ on windows - crbug.com/39399. That's why we use the custom |
| - // tilePage.lastDropEffect_ instead of e.dataTransfer.dropEffect. |
| - if (tilePage.selected && tilePage.lastDropEffect_ != 'copy') { |
| + // this.lastDropEffect instead of e.dataTransfer.dropEffect. |
| + if (tilePage.selected && this.lastDropEffect != 'copy') { |
| // The drag clone can still be hidden from the last drag move event. |
| this.dragClone.hidden = false; |
| // The tile's contents may have moved following the respositioning; |
| @@ -183,6 +188,7 @@ cr.define('ntp4', function() { |
| } |
| } |
| + delete this.lastDropEffect; |
| this.landedOnTrash = false; |
| }, |
| @@ -934,8 +940,6 @@ cr.define('ntp4', function() { |
| if (newDragIndex < 0 || newDragIndex >= this.tileElements_.length) |
| newDragIndex = this.dragItemIndex_; |
| this.updateDropIndicator_(newDragIndex); |
| - |
| - this.lastDropEffect_ = e.dataTransfer.dropEffect; |
| }, |
| /** |
| @@ -1074,6 +1078,7 @@ cr.define('ntp4', function() { |
| return { |
| getCurrentlyDraggingTile: getCurrentlyDraggingTile, |
| + setCurrentDropEffect: setCurrentDropEffect, |
| TilePage: TilePage, |
| }; |
| }); |