title: Change the height of a dragged item before drop using angular material drag and drop
body: <p>I tried to change the height of the dragged object using angular material drag and drop. I have tried to change the class name of the dragged div using cdkdragstart event and adjusted the height in the css.</p>
  
  <p>app.component.html</p>
  
  <pre><code>&lt;div cdkDropList #nameDragDrop="cdkDropList" [cdkDropListData]="names" [cdkDropListConnectedTo]="['nameTime']" (cdkDropListDropped)="drop($event)"&gt;
      &lt;div *ngFor="let iteration = index" cdkDrag (cdkDragMoved)="dragStarted($event,iteration)" (cdkDragEnded)="dragEnded(iteration)"&gt;
          &lt;div class="nameDiv" [ngClass]="{'reduceHeight': hideImageIcon === iteration, 'scenes': hideImageIcon !== iteration }"&gt;
          &lt;/div&gt;   
      &lt;/div&gt;
  &lt;/div
  </code></pre>
  
  <p>app.component.ts</p>
  
  <pre><code>dragStarted(event,index:any) {
      this.hideImageIcon = index;
  }
  
  drop(event: CdkDragDrop&lt;String[]&gt;) {
     if (event.previousContainer.id === event.container.id) {
        moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
     } else {
        transferArrayItem(event.previousContainer.data,
                          event.container.data,
                          event.previousIndex,
                          event.currentIndex);
     }
  }
  </code></pre>
  
  <p>I tried to get the dragged index using drag started method and assigned the index to the variable and change the class name in html file based on the condition.</p>
  
  <p>app.component.css</p>
  
  <pre><code>.reduceHeight{
      height:27px!important;
  }
  
  .show{
      display: block!important;
  }
  
  .hide{
      display: none!important;
  }
  </code></pre>
  
  <p>Here the problem is, height is not getting changed while dropping the item. I want to change the height of the dragged object on start of the drag event. Is there any event is available in angular material drag and drop to change the height of the dragged object?</p>