| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('ntp', function() { | 5 cr.define('ntp', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 // We can't pass the currently dragging tile via dataTransfer because of | 8 // We can't pass the currently dragging tile via dataTransfer because of |
| 9 // http://crbug.com/31037 | 9 // http://crbug.com/31037 |
| 10 var currentlyDraggingTile = null; | 10 var currentlyDraggingTile = null; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 for (var i = 0; i < clonelets.length; i++) { | 231 for (var i = 0; i < clonelets.length; i++) { |
| 232 clonelets[i].classList.remove('real'); | 232 clonelets[i].classList.remove('real'); |
| 233 } | 233 } |
| 234 | 234 |
| 235 this.appendChild(clone); | 235 this.appendChild(clone); |
| 236 this.doppleganger_ = clone; | 236 this.doppleganger_ = clone; |
| 237 | 237 |
| 238 if (isRTL()) | 238 if (isRTL()) |
| 239 x *= -1; | 239 x *= -1; |
| 240 | 240 |
| 241 this.doppleganger_.style.WebkitTransform = 'translate(' + x + 'px, ' + | 241 this.doppleganger_.style.transform = 'translate(' + x + 'px, ' + |
| 242 y + 'px)'; | 242 y + 'px)'; |
| 243 }, | 243 }, |
| 244 | 244 |
| 245 /** | 245 /** |
| 246 * Destroys the current doppleganger. | 246 * Destroys the current doppleganger. |
| 247 */ | 247 */ |
| 248 clearDoppleganger: function() { | 248 clearDoppleganger: function() { |
| 249 if (this.doppleganger_) { | 249 if (this.doppleganger_) { |
| 250 this.removeChild(this.doppleganger_); | 250 this.removeChild(this.doppleganger_); |
| 251 this.doppleganger_ = null; | 251 this.doppleganger_ = null; |
| 252 } | 252 } |
| (...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 }; | 1315 }; |
| 1316 | 1316 |
| 1317 return { | 1317 return { |
| 1318 getCurrentlyDraggingTile: getCurrentlyDraggingTile, | 1318 getCurrentlyDraggingTile: getCurrentlyDraggingTile, |
| 1319 setCurrentDropEffect: setCurrentDropEffect, | 1319 setCurrentDropEffect: setCurrentDropEffect, |
| 1320 // Not used outside, just for usage in JSDoc inside this file. | 1320 // Not used outside, just for usage in JSDoc inside this file. |
| 1321 Tile: Tile, | 1321 Tile: Tile, |
| 1322 TilePage: TilePage, | 1322 TilePage: TilePage, |
| 1323 }; | 1323 }; |
| 1324 }); | 1324 }); |
| OLD | NEW |