@ng-dl/delayed-dragover
v3.2.0
Published
Delay for dragover event and cross-device compatibility
Downloads
22
Maintainers
Readme
Delayed Dragover Directive
Delay for dragover event and cross-device compatibility.
Demo
Installation
Install with NPM:
npm i @ng-dl/delayed-dragover
Usage
import { DelayedDragoverModule } from '@ng-dl/delayed-dragover';
@NgModule({
...,
imports: [..., DelayedDragoverModule]
})
export class AppModule { }
Apply the directive:
<input dlDelayedDragover (dragoverDelayed)="onDragover()"/>
Properties:
Name | Description | Example
------------ | ------------- | -------------
@Input('dlDelayedDragover') class: string
| The class applied to the element | 'drag-over'
@Input('dlDragoverDelay') delay
| Delay in ms | 1000
@Input('dlDragoverDelayStep') delayStep
| Delay in addition to the dlDragoverDelay. Useful for letting the user change his mind before the default delay - i.e. hovering over paginator -> page number changes color -> page changes. | 1000
@Output() dragoverDelayed
| Emits after the delay |
@Output() preDragoverDelayed
| Emits before the dragoverDelayed if dlDragoverDelayStep in use |
Contributing
Pull requests are welcome. Suggestions are welcome.
For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.