fixed comments

This commit is contained in:
Timo Bejan 2021-11-10 10:22:40 +02:00
parent 0a3009ab1d
commit 8b3a1742a7
2 changed files with 1 additions and 5 deletions

View File

@ -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>,

View File

@ -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