| 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 DragWrapper | 6 * @fileoverview DragWrapper |
| 7 * A class for simplifying HTML5 drag and drop. Classes should use this to | 7 * A class for simplifying HTML5 drag and drop. Classes should use this to |
| 8 * handle the nitty gritty of nested drag enters and leaves. | 8 * handle the nitty gritty of nested drag enters and leaves. |
| 9 */ | 9 */ |
| 10 var DragWrapper = (function() { | 10 var DragWrapper = (function() { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 /** | 101 /** |
| 102 * Thunk for dragleave events fired on |target_|. | 102 * Thunk for dragleave events fired on |target_|. |
| 103 * @param {Event} e A MouseEvent for the drag. | 103 * @param {Event} e A MouseEvent for the drag. |
| 104 * @private | 104 * @private |
| 105 */ | 105 */ |
| 106 onDragLeave_: function(e) { | 106 onDragLeave_: function(e) { |
| 107 if (--this.dragEnters_ > 0) | 107 if (--this.dragEnters_ > 0) |
| 108 return; | 108 return; |
| 109 | 109 |
| 110 this.target_.classList.remove('drag-target'); | 110 this.target_.classList.remove('drag-target'); |
| 111 this.handler_.doDragLeave(); | 111 this.handler_.doDragLeave(e); |
| 112 }, | 112 }, |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 return DragWrapper; | 115 return DragWrapper; |
| 116 })(); | 116 })(); |
| OLD | NEW |