Skip to content

Commit aed32d6

Browse files
Merge pull request #59 from swftvsn/master
Allow drag events to be ignored that originate from document when applying custom styles
2 parents 84cb8e8 + 76ef4de commit aed32d6

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
## Change Log
2+
### [3.0.2](https://github.com/georgipeltekov/ngx-file-drop/compare/v3.0.1...v3.0.2) (2018-04-29)
3+
* Allow drag events to be ignored that originate from document (introduced in 3.0.1) even if using custom styles
4+
5+
### [3.0.1](https://github.com/georgipeltekov/ngx-file-drop/compare/v3.0.0...v3.0.1) (2018-04-25)
6+
* Conditionally Disable Dropzone and Ignore DragEvents that initiate from within the browser document
7+
28
### [3.0.0](https://github.com/georgipeltekov/ngx-file-drop/compare/v2.0.5...v3.0.0) (2018-03-15)
39
* Added better typescript types
410

@@ -74,4 +80,4 @@
7480
* Style changes
7581

7682
### 1.0.0 (2017-05-25)
77-
* Initial release
83+
* Initial release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-file-drop",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",

src/lib/ngx-drop/file-drop.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ export class FileComponent implements OnDestroy {
4444
) {
4545
if (!this.customstyle) {
4646
this.customstyle = 'drop-zone';
47-
this.globalStart = this.renderer.listen('document', 'dragstart', (evt) => {
48-
this.globalDisable = true;
49-
});
50-
this.globalEnd = this.renderer.listen('document', 'dragend', (evt) => {
51-
this.globalDisable = false;
52-
});
5347
}
48+
this.globalStart = this.renderer.listen('document', 'dragstart', (evt) => {
49+
this.globalDisable = true;
50+
});
51+
this.globalEnd = this.renderer.listen('document', 'dragend', (evt) => {
52+
this.globalDisable = false;
53+
});
5454
}
5555

5656
public onDragOver(event: Event): void {

0 commit comments

Comments
 (0)