Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
reorderDrop(event: CdkDragDrop) {
moveItemInArray(this.bucket.objectives, event.previousIndex, event.currentIndex);
if (event.previousIndex != event.currentIndex) {
this.onChanged.emit(this.bucket);
}
}
drop(event: CdkDragDrop) {
moveItemInArray(this.cipher.fields, event.previousIndex, event.currentIndex);
}
drop(event: CdkDragDrop) {
moveItemInArray(this.selected, event.previousIndex, event.currentIndex);
}
public columnDropped(event: CdkDragDrop): void {
const columns = this.allPossibleColumns.slice();
moveItemInArray(columns, event.previousIndex, event.currentIndex);
this.allPossibleColumns = columns;
this.changeDetectorRef.detectChanges();
}
dropWidget(event: CdkDragDrop) {
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(
event.previousContainer.data, event.container.data, event.previousIndex,
event.currentIndex);
}
this.save();
}
}
taskDrop(event: CdkDragDrop) {
moveItemInArray(this.board.tasks, event.previousIndex, event.currentIndex);
this.boardService.updateTasks(this.board.id, this.board.tasks);
}
moveItem(fromIndex: number, toIndex: number): void {
if (this._lastRange) {
fromIndex = this._lastRange.start + fromIndex;
toIndex = this._lastRange.start + toIndex;
}
if (this.length > 0) {
moveItemInArray(this._source, fromIndex, toIndex)
const data = this._lastRange
? this._source.slice(this._lastRange.start, this._lastRange.end)
: this._source
;
this._renderData$.next(data);
}
}
drop(event: CdkDragDrop) {
if (event.previousContainer === event.container) {
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
} else {
transferArrayItem(event.previousContainer.data,
event.container.data,
event.previousIndex,
event.currentIndex);
}
}
}
drop(event: CdkDragDrop, extensionPoint) {
if (event.previousIndex !== event.currentIndex) {
moveItemInArray(this.policies[extensionPoint], event.previousIndex, event.currentIndex);
this.policies[extensionPoint].forEach(function (policy, i) {
policy.order = i;
});
this.policyService.updateAll(this.domainId, this.policies[extensionPoint]).subscribe(() => {
this.snackbarService.open("Policy's order changed");
});
}
}
onDrop(event: CdkDragDrop): void {
this.emitEvent(Event.onRowDrop, event);
moveItemInArray(this.data, event.previousIndex, event.currentIndex);
}