1 // ==========================================================================
  2 // Project:   SproutCore - JavaScript Application Framework
  3 // Copyright: ©2006-2011 Strobe Inc. and contributors.
  4 //            Portions ©2008-2011 Apple Inc. All rights reserved.
  5 // License:   Licensed under MIT license (see license.js)
  6 // ==========================================================================
  7 
  8 sc_require('system/drag') ;
  9 
 10 SC.Drag.mixin(
 11 /** @scope SC.Drag */ {
 12    
 13   /**
 14     Convenience method to turn an operation mask into a descriptive string.
 15   */
 16   inspectOperation: function(op) {
 17     var ret = [] ;
 18     if (op === SC.DRAG_NONE) {
 19       ret = ['DRAG_NONE'];
 20     } else if (op === SC.DRAG_ANY) {
 21       ret = ['DRAG_ANY'] ;
 22     } else {
 23       if (op & SC.DRAG_LINK) {
 24         ret.push('DRAG_LINK') ;
 25       }
 26       
 27       if (op & SC.DRAG_COPY) {
 28         ret.push('DRAG_COPY') ;
 29       }
 30       
 31       if (op & SC.DRAG_MOVE) {
 32         ret.push('DRAG_MOVE') ;
 33       }
 34       
 35       if (op & SC.DRAG_REORDER) {
 36         ret.push('DRAG_REORDER') ;
 37       }
 38     }
 39     return ret.join('|') ;
 40   }
 41 
 42 });
 43