@ng-dl/delayed-dragover
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

Delayed Dragover Directive

Delay for dragover event and cross-device compatibility.

Demo

StackBlitz

Edit demo

Installation

Install with NPM:

npm version

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.

License

MIT

Package Sidebar

Install

npm i @ng-dl/delayed-dragover

Weekly Downloads

7

Version

3.2.0

License

MIT

Unpacked Size

57.8 kB

Total Files

16

Last publish

Collaborators

  • danieliverant