Skip to content

Commit

Permalink
chore: Update IDropDroppedEventArgs #1362
Browse files Browse the repository at this point in the history
  • Loading branch information
IvayloG committed Aug 30, 2019
1 parent 2edcaf4 commit 7fd1ac5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import {
ViewChildren,
ViewEncapsulation } from "@angular/core";
import {
IDropDroppedEventArgs,
IgxDialogComponent,
IgxDropEnterEventArgs,
IgxDropEventArgs,
IgxDropLeaveEventArgs,
IgxGridComponent
} from "igniteui-angular";

Expand Down Expand Up @@ -348,15 +346,15 @@ export class GridMultiRowLayoutConfigurationComponent {
this.selectedBlock.colsWidth = event.target.value;
}

public onColEnter(event: IgxDropEnterEventArgs, blockIndex, rowIndex, colIndex) {
public onColEnter(event: IDropDroppedEventArgs, blockIndex, rowIndex, colIndex) {
this.blocks[blockIndex].collection[rowIndex][colIndex].hovered = true;
}

public onColLeave(event: IgxDropLeaveEventArgs, blockIndex, rowIndex, colIndex) {
public onColLeave(event: IDropDroppedEventArgs, blockIndex, rowIndex, colIndex) {
this.blocks[blockIndex].collection[rowIndex][colIndex].hovered = false;
}

public onColDropped(event: IgxDropEventArgs, blockIndex, rowIndex, colIndex) {
public onColDropped(event: IDropDroppedEventArgs, blockIndex, rowIndex, colIndex) {
event.cancel = true;
this.blocks[blockIndex].collection[rowIndex][colIndex].key = event.drag.data.chip.data.key;
this.updateCollectionLayout(blockIndex);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent } from "igniteui-angular";
import { createData, IDrive } from "../../data/files.data";

enum DragIcon {
Expand All @@ -25,7 +25,7 @@ export class HGridRowDragBaseComponent {
args.animation = true;
}

public onDropAllowed(args: IgxDropEventArgs) {
public onDropAllowed(args: IDropDroppedEventArgs) {
args.cancel = true;
const draggedRow: IgxHierarchicalRowComponent = args.dragData;
draggedRow.delete();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent } from "igniteui-angular";
import { createData, IDrive } from "../../data/files.data";

enum DragIcon {
Expand All @@ -25,7 +25,7 @@ export class HGridDragSampleComponent {
args.animation = true;
}

public onDropAllowed(args: IgxDropEventArgs) {
public onDropAllowed(args: IDropDroppedEventArgs) {
args.cancel = true;
const draggedRow: IgxHierarchicalRowComponent = args.dragData;
draggedRow.delete();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent, Point } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxHierarchicalGridComponent, IgxHierarchicalRowComponent,
Point } from "igniteui-angular";
import { createData, IDrive } from "../../data/files.data";

@Component({
Expand All @@ -23,7 +24,7 @@ export class HGridRowReorderComponent {
}
}

public rowDrop(args: IgxDropEventArgs): void {
public rowDrop(args: IDropDroppedEventArgs): void {
args.cancel = true;
const targetRow = args.dragData;
const event = args.originalEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent } from "igniteui-angular";
import { FULL_EMPLOYEE_DATA } from "../data/employees";

enum DragIcon {
Expand All @@ -25,7 +25,7 @@ export class TreeGridRowDragBase {
args.animation = true;
}

public onDropAllowed(args: IgxDropEventArgs) {
public onDropAllowed(args: IDropDroppedEventArgs) {
args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
draggedRow.delete();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent } from "igniteui-angular";
import { FULL_EMPLOYEE_DATA } from "../data/employees";

enum DragIcon {
Expand All @@ -25,7 +25,7 @@ export class TreeGridRowDrag {
args.animation = true;
}

public onDropAllowed(args: IgxDropEventArgs) {
public onDropAllowed(args: IDropDroppedEventArgs) {
args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
draggedRow.delete();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
import { IgxDropEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent, Point } from "igniteui-angular";
import { IDropDroppedEventArgs, IgxTreeGridComponent, IgxTreeGridRowComponent, Point } from "igniteui-angular";
import { generateEmployeeFlatData } from "../data/employees-flat";

@Component({
Expand All @@ -23,7 +23,7 @@ export class TreeGridRowReorderComponent {
}
}

public dropInGrid(args: IgxDropEventArgs): void {
public dropInGrid(args: IDropDroppedEventArgs): void {
args.cancel = true;
const draggedRow: IgxTreeGridRowComponent = args.dragData;
const event = args.originalEvent;
Expand Down

0 comments on commit 7fd1ac5

Please sign in to comment.