Docs
API
  • dropZone

    Function

    dropZone is used for dragging rows into custom elements.
    It is used in pair with dropZoneFn

    Example:

    
    var grid = new FancyGrid({  
      dropZone: function(el){
        let dropZoneEl = document.getElementById('my-drop-el');
    
        if (el.id === 'my-drop-el') {
          dropZoneEl.style.borderWidth = '2px';
          return true;
        }
    
        dropZoneEl.style.borderWidth = '1px';
        return false;
      },
      dropZoneFn: function(data){
        let dropZoneEl = document.getElementById('my-drop-el');
    
        grid.remove(data);
    
        dropZoneEl.style.borderWidth = '1px';
        dropZoneEl.innerHTML = data.length;
      },
      ...
    });
    

    Sample on JSFiddle

    Default

    
    undefined