mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-12728] Allowed to hide drag indicator, keep node in original position until dopped
This commit is contained in:
@@ -108,6 +108,10 @@
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4px;
|
||||
}
|
||||
|
||||
#{ms.$cdk-drag-placeholder} {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-current {
|
||||
|
||||
@@ -33,9 +33,9 @@ import { Node, PathElement } from '@alfresco/js-api';
|
||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { IconModule } from '@alfresco/adf-core';
|
||||
import { DataRow, IconModule } from '@alfresco/adf-core';
|
||||
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
||||
import { CdkDrag, CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';
|
||||
import { CdkDragDrop, CdkDropList } from '@angular/cdk/drag-drop';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-breadcrumb',
|
||||
@@ -116,6 +116,9 @@ export class BreadcrumbComponent implements OnInit, OnChanges {
|
||||
@Output()
|
||||
breadcrumbPathElementsChange = new EventEmitter<string[]>();
|
||||
|
||||
@Output()
|
||||
dropped = new EventEmitter<CdkDragDrop<PathElement, PathElement, DataRow>>();
|
||||
|
||||
ngOnInit() {
|
||||
this.transform = this.transform ? this.transform : null;
|
||||
|
||||
@@ -228,9 +231,9 @@ export class BreadcrumbComponent implements OnInit, OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
onDrop(event: CdkDragDrop<CdkDrag>) {
|
||||
if (!event.isPointerOverContainer) {
|
||||
return;
|
||||
onDrop(event: CdkDragDrop<PathElement, PathElement, DataRow>): void {
|
||||
if (event.isPointerOverContainer) {
|
||||
this.dropped.emit(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
[class.adf-datatable-gallery-thumbnails]="data.thumbnails"
|
||||
[enableDragRows]="enableDragRows"
|
||||
[dropListConnectedTo]="dropListConnectedTo"
|
||||
[dragBoundary]="dragBoundary">
|
||||
[dragBoundary]="dragBoundary"
|
||||
[showDragIndicator]="showDragIndicator">
|
||||
|
||||
<div *ngIf="headerFilters">
|
||||
<adf-filter-header
|
||||
|
||||
@@ -396,6 +396,9 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On
|
||||
@Input()
|
||||
dragBoundary = '.adf-datatable-body';
|
||||
|
||||
@Input()
|
||||
showDragIndicator = true;
|
||||
|
||||
/**
|
||||
* Indicates if the data is provided externally.
|
||||
* If true the component won't fetch data itself
|
||||
|
||||
@@ -41,5 +41,6 @@ $mat-select-arrow: '.mat-mdc-select-arrow';
|
||||
$mat-evolution-chip-set: '.mdc-evolution-chip-set';
|
||||
$cdk-overlay-pane: '.cdk-overlay-pane';
|
||||
$cdk-drop-list-dragging: '.cdk-drop-list-dragging';
|
||||
$cdk-drag-placeholder: '.cdk-drag-placeholder';
|
||||
$mat-list-item-disabled: '.mdc-list-item--disabled';
|
||||
$mat-switch: '.mdc-switch';
|
||||
|
||||
Reference in New Issue
Block a user