Changeset 21630
- Timestamp:
- 08/27/2012 10:20:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/plupload/wp-plupload.js
r21592 r21630 12 12 * 13 13 * @param options - object - The options passed to the new plupload instance. 14 * Requires the following parameters:14 * Accepts the following parameters: 15 15 * - container - The id of uploader container. 16 16 * - browser - The id of button to trigger the file select. … … 87 87 // Generate drag/drop helper classes. 88 88 (function( dropzone, supported ) { 89 var sensitivity = 50, 90 active; 89 var timer, active; 91 90 92 91 if ( ! dropzone ) … … 101 100 // simulate it with a limited 'dragover' 102 101 dropzone.bind( 'dragover.wp-uploader', function(){ 102 if ( timer ) 103 clearTimeout( timer ); 104 103 105 if ( active ) 104 106 return; … … 109 111 110 112 dropzone.bind('dragleave.wp-uploader, drop.wp-uploader', function(){ 111 active = false; 112 dropzone.removeClass('drag-over'); 113 // Using an instant timer prevents the drag-over class from 114 // being quickly removed and re-added when elements inside the 115 // dropzone are repositioned. 116 // 117 // See http://core.trac.wordpress.org/ticket/21705 118 timer = setTimeout( function() { 119 active = false; 120 dropzone.removeClass('drag-over'); 121 }, 0 ); 113 122 }); 114 123 }( this.dropzone, this.supports.dragdrop ));
Note: See TracChangeset
for help on using the changeset viewer.