description template editor: made drag and drop more user friendly

This commit is contained in:
Sofia Papacharalampous 2024-05-28 14:37:11 +03:00
parent 7407fc6c39
commit 572f970c1e
2 changed files with 19 additions and 4 deletions

View File

@ -57,10 +57,12 @@
<mat-card-content>
<mat-card-header *ngIf="(fieldset.get('id').value === selectedFieldSetId) && !viewOnly">
<mat-icon class="handle" (mousedown)="enableReordering()"
style="display:inline-block; margin: 0px auto; cursor: grab;transform: rotate(90deg); opacity: 0.3;">drag_indicator</mat-icon>
<mat-icon *ngIf="reorderingMode" class="handle dragpan enabled-dragpan">drag_indicator</mat-icon>
<button mat-icon-button class="ml-auto mr-auto" *ngIf="!reorderingMode" (click)="enableReordering()">
<mat-icon class="handle dragpan">drag_indicator</mat-icon>
</button>
</mat-card-header>
<app-description-template-editor-composite-field-component [reorderingMode]="reorderingMode && fieldset.get('id').value === selectedFieldSetId" [form]="fieldset"
<app-description-template-editor-composite-field-component [reorderingMode]="reorderingMode" [form]="fieldset"
[viewOnly]="viewOnly" [numbering]="numbering + '.'+ (i+1)"
[hasFocus]="fieldset.get('id').value === selectedFieldSetId"
[datasetProfileId]="datasetProfileId"

View File

@ -77,4 +77,17 @@ $blue-color-light: #5cf7f2;
.list-unstyled{
margin-bottom: 0.2rem;
}
}
}
.dragpan {
transform: rotate(90deg);
opacity: 0.3;
&.enabled-dragpan {
display:inline-block;
margin: 0px auto;
cursor: grab;
color: var(--secondary-color);
opacity: 0.6 !important;
}
}