Skip to content

Commit

Permalink
support new events
Browse files Browse the repository at this point in the history
  • Loading branch information
Xie, Ziyu committed Jun 13, 2017
1 parent 011bfa2 commit f7f6942
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 17 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<a name="1.0.3"></a>
## [1.0.3](https://github.com/xieziyu/angular2-draggable/compare/v1.0.2...v1.0.3) (2017-06-13)

### New
+ Support `started` and `stopped` dragging event.

<a name="1.0.2"></a>
## [1.0.2](https://github.com/xieziyu/angular2-draggable/compare/v1.0.1...v1.0.2) (2017-05-05)

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ When `ngDraggable` is enabled on some element, `ng-draggable` class is automatic

# Events

To be supported soon.
Support `started` and `stopped` events. The `nativeElement` of the host would be emitted.

+ Simple example:
+ html:
```html
<div ngDraggable (started)="onDragBegin($event)" (stopped)="onDragEnd($event)">Drag me!</div>
```
8 changes: 7 additions & 1 deletion dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ When `ngDraggable` is enabled on some element, `ng-draggable` class is automatic

# Events

To be supported soon.
Support `started` and `stopped` events. The `nativeElement` of the host would be emitted.

+ Simple example:
+ html:
```html
<div ngDraggable (started)="onDragBegin($event)" (stopped)="onDragEnd($event)">Drag me!</div>
```
4 changes: 3 additions & 1 deletion dist/directive/angular-draggable.directive.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ElementRef, Renderer, OnInit } from '@angular/core';
import { ElementRef, Renderer, OnInit, EventEmitter } from '@angular/core';
export declare class AngularDraggableDirective implements OnInit {
private el;
private renderer;
Expand All @@ -7,6 +7,8 @@ export declare class AngularDraggableDirective implements OnInit {
private orignal;
private oldZIndex;
private oldPosition;
started: EventEmitter<any>;
stopped: EventEmitter<any>;
handle: HTMLElement;
ngDraggable: any;
constructor(el: ElementRef, renderer: Renderer);
Expand Down
19 changes: 13 additions & 6 deletions dist/directive/angular-draggable.directive.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/directive/angular-draggable.directive.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f7f6942

Please sign in to comment.