| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |