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

Side by Side Diff: chrome/browser/resources/shared/js/cr/ui/drag_wrapper.js

Issue 8423055: [Aura] Initial app list webui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove grabber.js Created 9 years, 1 month 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 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 cr.define('cr.ui', function() {
11 /** 11 /**
12 * Creates a DragWrapper which listens for drag target events on |target| and 12 * Creates a DragWrapper which listens for drag target events on |target| and
13 * delegates event handling to |handler|. The |handler| must implement: 13 * delegates event handling to |handler|. The |handler| must implement:
14 * shouldAcceptDrag 14 * shouldAcceptDrag
15 * doDragEnter 15 * doDragEnter
16 * doDragLeave 16 * doDragLeave
17 * doDragOver 17 * doDragOver
18 * doDrop 18 * doDrop
19 */ 19 */
20 function DragWrapper(target, handler) { 20 function DragWrapper(target, handler) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(e); 111 this.handler_.doDragLeave(e);
112 }, 112 },
113 }; 113 };
114 114
115 return DragWrapper; 115 return {
116 })(); 116 DragWrapper: DragWrapper
117 };
118 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/js/cr/ui/card_slider.js ('k') | chrome/browser/resources/shared/js/cr/ui/touch_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698