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

Side by Side Diff: chrome/browser/resources/ntp4/nav_dot.js

Issue 7951011: Moving where I'm doing dropEffect normalization. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: small whitespace changes Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Nav dot 6 * @fileoverview Nav dot
7 * This is the class for the navigation controls that appear along the bottom 7 * This is the class for the navigation controls that appear along the bottom
8 * of the NTP. 8 * of the NTP.
9 */ 9 */
10 10
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 * A dragged element has moved over the navigation dot. Show the correct 196 * A dragged element has moved over the navigation dot. Show the correct
197 * indicator and prevent default handling so the <input> won't act as a drag 197 * indicator and prevent default handling so the <input> won't act as a drag
198 * target. 198 * target.
199 * @param {Event} e The MouseOver event for the drag. 199 * @param {Event} e The MouseOver event for the drag.
200 * @private 200 * @private
201 */ 201 */
202 doDragOver: function(e) { 202 doDragOver: function(e) {
203 e.preventDefault(); 203 e.preventDefault();
204 204
205 if (!this.dragWrapper_.isCurrentDragTarget) 205 if (!this.dragWrapper_.isCurrentDragTarget)
206 e.dataTransfer.dropEffect = 'none'; 206 ntp4.setCurrentDropEffect(e.dataTransfer, 'none');
207 else 207 else
208 this.page_.setDropEffect(e.dataTransfer); 208 this.page_.setDropEffect(e.dataTransfer);
209 }, 209 },
210 210
211 /** 211 /**
212 * A dragged element has been dropped on the navigation dot. Tell the page 212 * A dragged element has been dropped on the navigation dot. Tell the page
213 * to append it. 213 * to append it.
214 * @param {Event} e The MouseOver event for the drag. 214 * @param {Event} e The MouseOver event for the drag.
215 * @private 215 * @private
216 */ 216 */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 onTransitionEnd_: function(e) { 252 onTransitionEnd_: function(e) {
253 if (e.propertyName === 'max-width' && this.classList.contains('small')) 253 if (e.propertyName === 'max-width' && this.classList.contains('small'))
254 this.parentNode.removeChild(this); 254 this.parentNode.removeChild(this);
255 }, 255 },
256 }; 256 };
257 257
258 return { 258 return {
259 NavDot: NavDot, 259 NavDot: NavDot,
260 }; 260 };
261 }); 261 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/bookmarks_page.js ('k') | chrome/browser/resources/ntp4/tile_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698