fixed comments
This commit is contained in:
parent
0a3009ab1d
commit
8b3a1742a7
@ -1,5 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
@ -14,7 +13,6 @@ export class ResizeAnnotationDialogComponent implements OnInit {
|
||||
isDocumentAdmin: boolean;
|
||||
|
||||
constructor(
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _permissionsService: PermissionsService,
|
||||
private readonly _formBuilder: FormBuilder,
|
||||
public dialogRef: MatDialogRef<ResizeAnnotationDialogComponent>,
|
||||
|
||||
@ -140,9 +140,7 @@ export class AnnotationActionsService {
|
||||
}));
|
||||
|
||||
// you can only resize one annotation at a time
|
||||
const canResize =
|
||||
annotationPermissions.length === 1 &&
|
||||
annotationPermissions.reduce((acc, next) => acc && next.permissions.canResizeAnnotation, true);
|
||||
const canResize = annotationPermissions.length === 1 && annotationPermissions[0].permissions.canResizeAnnotation;
|
||||
if (canResize) {
|
||||
const firstAnnotation = annotations[0];
|
||||
// if we already entered resize-mode previously
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user