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

Unified Diff: chrome/browser/resources/ntp4/apps_page.js

Issue 10388134: [NTP4] Fix appmarklet animation drop bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reduce moar Created 8 years, 7 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 | « no previous file | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/apps_page.js
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index e5f2fe7309a4cccd7d985b4095c0401c03b965d5..b6ce2c4d50e42b013b8d427d5b03803c3de141e1 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -663,8 +663,9 @@ cr.define('ntp', function() {
* Similar to appendApp, but it respects the app_launch_ordinal field of
* |appData|.
* @param {Object} appData The data that describes the app.
+ * @param {boolean} animate Whether to animate the insertion.
*/
- insertApp: function(appData) {
+ insertApp: function(appData, animate) {
var index = this.tileElements_.length;
for (var i = 0; i < this.tileElements_.length; i++) {
if (appData.app_launch_ordinal <
@@ -674,7 +675,7 @@ cr.define('ntp', function() {
}
}
- this.addTileAt(new App(appData), index, false);
+ this.addTileAt(new App(appData), index, animate);
},
/**
@@ -749,17 +750,6 @@ cr.define('ntp', function() {
},
/** @inheritDoc */
- doDragOver: function(e) {
- var tile = ntp.getCurrentlyDraggingTile();
- if (tile && !tile.querySelector('.app')) {
- e.preventDefault();
- this.setDropEffect(e.dataTransfer);
Dan Beam 2012/05/15 01:46:03 this was avoiding calling TilePage#updateDropIndic
Evan Stade 2012/05/15 03:01:11 yes this is intentional, you will notice that most
Dan Beam 2012/05/15 04:00:44 OK, fixed outside data handling to match.
- } else {
- TilePage.prototype.doDragOver.call(this, e);
- }
- },
-
- /** @inheritDoc */
shouldAcceptDrag: function(e) {
if (ntp.getCurrentlyDraggingTile())
return true;
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/page_list_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698