Changed Roo/bootstrap/Card.js
authorAlan Knowles <alan@roojs.com>
Wed, 7 Apr 2021 09:25:16 +0000 (17:25 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 7 Apr 2021 09:25:16 +0000 (17:25 +0800)
Roo/bootstrap/Card.js

index 60eaa03..a05abee 100644 (file)
@@ -437,6 +437,17 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
     /**
     *    Part of the Roo.dd.DropZone interface. If no target node is found, the
     *    whole Element becomes the target, and this causes the drop gesture to append.
+    *
+    *    Returns an object:
+    *     {
+           
+           position : 'below' or 'above'
+           card  : relateive to card OBJECT (or true for no cards listed)
+           items_n : relative to nth item in list
+           card_n : relative to  nth card in list
+    }
+    *
+    *    
     */
     getTargetFromEvent : function(e, dragged_card_el)
     {
@@ -530,7 +541,11 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
         }
         Roo.log(['getTargetFromEvent', target_info ]);
         
-         
+        
+        if (this.fireEvent('cardover', data) === false) {
+            return;
+        }
+        
         this.dropPlaceHolder('show', target_info,data);
         
         return false; 
@@ -555,9 +570,7 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component,  {
         }
         this.dropPlaceHolder('hide');
   
-         
-    
-    
+          
     
         this.acceptCard(data.source, info.position, info.card, info.items_n);
         return true;