# Positioning Custom Drag and Drop Hints

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® Kendo UI Drag and Drop</td>
	    </tr>
    </tbody>
</table>

## Description

How can I change the default position of the custom drag hint of the Kendo UI for Angular Drag and Drop utility?

## Solution

When utilizing a custom hint element that is smaller than the drag target, it may appear offset from the mouse pointer, requiring manual position adjustments. To customize the default hint position:

1. Handle the [`onDrag`](https://www.telerik.com/kendo-angular-ui/components/utils/api/dragtargetdirective#ondrag) event of the element with the `kendoDragTarget` directive applied.

   ```html
   
   <div kendoDragTarget (onDrag)="onDrag($event)" [hint]="{hintTemplate: hint}">
       Drag Me!
   </div>

   
   <ng-template #hint >
       <div> DRAG HINT <div>
   </ng-template>
   ```

2. Prevent the default `onDrag` event behavior and use the [`Renderer2`](https://angular.io/api/core/Renderer2) to set the `top` and `left` CSS properties of the hint element to the `clientX` and `clientY` values.

   ```ts
   constructor(private r: Renderer2) {}

   public onDrag(e: DragTargetDragEvent): void {
       e.preventDefault();
       this.topValue = `${e.dragEvent.clientY}px`;
       this.leftValue = `${e.dragEvent.clientX}px`;

       this.r.setStyle(e.hintElement, 'top', this.topValue);
       this.r.setStyle(e.hintElement, 'left', this.leftValue);
   }
   ```
