| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 }, | 189 }, |
| 190 | 190 |
| 191 /** | 191 /** |
| 192 * A dragged element has been dropped on the navigation dot. Tell the page | 192 * A dragged element has been dropped on the navigation dot. Tell the page |
| 193 * to append it. | 193 * to append it. |
| 194 * @param {Event} e The MouseOver event for the drag. | 194 * @param {Event} e The MouseOver event for the drag. |
| 195 * @private | 195 * @private |
| 196 */ | 196 */ |
| 197 doDrop: function(e) { | 197 doDrop: function(e) { |
| 198 e.stopPropagation(); | 198 e.stopPropagation(); |
| 199 if (ntp4.getCurrentlyDraggingTile) | 199 if (ntp4.getCurrentlyDraggingTile) { |
| 200 this.page_.appendDraggingTile(); | 200 this.page_.appendDraggingTile(); |
| 201 this.page_.cleanupDrag(); |
| 202 } |
| 201 // TODO(estade): handle non-tile drags. | 203 // TODO(estade): handle non-tile drags. |
| 202 | 204 |
| 203 this.cancelDelayedSwitch_(); | 205 this.cancelDelayedSwitch_(); |
| 204 }, | 206 }, |
| 205 | 207 |
| 206 /** | 208 /** |
| 207 * The drag has left the navigation dot. | 209 * The drag has left the navigation dot. |
| 208 * @param {Event} e The MouseOver event for the drag. | 210 * @param {Event} e The MouseOver event for the drag. |
| 209 * @private | 211 * @private |
| 210 */ | 212 */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 231 onTransitionEnd_: function(e) { | 233 onTransitionEnd_: function(e) { |
| 232 if (e.propertyName === 'max-width' && this.classList.contains('small')) | 234 if (e.propertyName === 'max-width' && this.classList.contains('small')) |
| 233 this.parentNode.removeChild(this); | 235 this.parentNode.removeChild(this); |
| 234 }, | 236 }, |
| 235 }; | 237 }; |
| 236 | 238 |
| 237 return { | 239 return { |
| 238 NavDot: NavDot, | 240 NavDot: NavDot, |
| 239 }; | 241 }; |
| 240 }); | 242 }); |
| OLD | NEW |